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

Subject: RE: [xsl] Using translate() for single quotes in XSL1.0
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Tue, 29 Aug 2006 15:09:15 +0100
> <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

Current Thread