[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

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


Subject: RE: [xsl] Replace Apostrophe Template -- very brief example...not working
From: Americo Albuquerque <melinor@xxxxxxxx>
Date: Sat, 11 Oct 2003 10:54:03 +0100

Hi

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx 
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of 
> Kathy Burke
> Sent: Friday, October 10, 2003 9:14 PM
> To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'
> Subject: RE: [xsl] Replace Apostrophe Template -- very brief 
> example...not working
> 
> 
> Sorry...
> 
> The template from J. works except I not only get the \' in 
> the html source, I also get it when it parses to the browser. 
> For example "Kathy's" turns into Kathy\'s in both places and 
> my javascript is still complaining about the apostrophe.

That's happening because you're calling the named template in the text()
template. This template is applied in all text node of your source. If
you only want to call the named template with a particular text node
then change your text template to <xsl:template match="mynode/text()">

The 'mynode' will be the node where you want to change the apostrophes

Regards,
Americo Albuquerque


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



Current Thread