Re: [xsl] Translating "("

Subject: Re: [xsl] Translating "("
From: Geert Josten <Geert.Josten@xxxxxxxxxxx>
Date: Mon, 15 Nov 2004 16:52:53 +0100
now to get that expression into a select attrbute. As far as XML is
concerned it's all just an opaque string, that has three " and five '
so if you are using " to delimit the attrinute you need to &quot; the
occurrences of " in the attribute value

select="translate(normalize-space(ln:term),
   concat(&quot;'&#160;/()&quot;,'&quot;')
   '_')"

David

And if your parser still gets confused, or all the quotes are turning before your eyes, just use two variables like:


   <xsl:variable name="apos">&apos;</xsl:variable>
   <xsl:variable name="quot">&quot;</xsl:variable>

Though, as discussed recently on this list, this creates document tree fragments rather than strings in XSLT 1. (Not that you would notice much about that..)

Grtz,
Geert

Current Thread