xsl-list
[Top] [All Lists]

RE: [xsl] Using translate() for single quotes in XSL1.0

2006-08-29 07:09:29
<xsl:value-of select="replace(.,'&#34;','&#39;')"/>

But it doesn't because the entity references seem to be 
resolved before the stylesheet is processed. Running it with 
Saxon (XSLT2) produces this error:

{replace(.,'"','''}:
Unmatched quote in expression

Now I'm stuck. Any ideas?

<xsl:variable name="apos">'</xsl:variable>
<xsl:variable name="quot">"</xsl:variable>

then 

replace(., $quot, $apos)

Michael Kay


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--