[Home] [By Thread] [By Date] [Recent Entries]

Subject: Re: translate quot to apos
From: David Carlisle <davidc@xxxxxxxxx>
Date: Mon, 10 Jul 2000 15:45:53 +0100 (BST)
> The following does not work, XT complains about a missing quote in the line
> containing the translate function. 

>    <xsl:value-of select="translate(Tag1, '&quot;', '&apos;')"/>

After the XML parser has finished, the above passes the following xpath
expression to the XSL system

"translate(Tag1, '"', ''')

and that third argument isn't legal, so you can instead do

   <xsl:value-of select="translate(Tag1, '&quot;', '&quot;'&quot;)"/>

which is the xpath expression

"translate(Tag1, '"', "'")

David


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


Current Thread
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member