RE: [xsl] How to include ' in the argument of <translate> function

Subject: RE: [xsl] How to include ' in the argument of <translate> function
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Fri, 20 Nov 2009 23:47:27 -0000
The least confusing way to do this is to use variables:

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

then <xsl:value-of select="translate($in, $apos, '')"/>

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay  

> -----Original Message-----
> From: Mak, Lucas Wing Kau [mailto:makw@xxxxxxxxxxxxxxxx] 
> Sent: 20 November 2009 21:46
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: [xsl] How to include ' in the argument of 
> <translate> function
> 
> I am trying to replace the apostrophe (') with a space by the 
> <translate> function but oXygen gave me an error message 
> ("unmatched quote in expression") when I put &apos; in the 
> second argument. How can I resolve that?
> 
> Thanks,
> 
> Lucas

Current Thread