[xsl] Replace Apostrophe Template -- very brief example...not working

Subject: [xsl] Replace Apostrophe Template -- very brief example...not working
From: "Kathy Burke" <Kathy_Burke@xxxxxxxxx>
Date: Fri, 10 Oct 2003 14:18:19 -0400
Hi, since I realize I posted my example that I'm sure was too long for
anyone to want to slogg through it, I'm reposting with a very brief example
hoping someone can help me.

I'm using Jeni T's replace-apostrophe template, but when I transform the
file into html source (MSXML4) the apostrophes have NOT change to \'     --
where am I going wrong...PLEASE?

Thanks, Kathy

TEST XML*************
?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="KB_TEST.xsl"?>
<Title>Test apostrophes problem</Title>
<para>Test Kathy's apostrophes problem.</para>
<para>An Apostrophe's a terrible thing to waste.</para>

TEST XSL**************
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
	<xsl:output method="html"/>
	<xsl:template match="/">
				<title>KB Test</title>
	<xsl:template name="escape-apos">
		<xsl:param name="string" />
		<xsl:variable name="apos" select='"&apos;"' />
			<xsl:when test='contains($string, $apos)'>
select="substring-before($string, $apos)" />
				<xsl:call-template name="escape-apos">
					<xsl:with-param name="string"
select="substring-after($string, $apos)" />
				<xsl:value-of select="$string" />
	<xsl:template match="para">

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread