Subject: [xsl] Re: Escaping quotes in XPath expressions From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx> Date: Mon, 17 Nov 2003 18:50:45 +0100 |
<yguaba@xxxxxxxxxxxx> wrote in message news:3FB8A506.3172.3EFAD4@xxxxxxxxxxxx > On 15 Nov 2003 at 14:53, Dimitre Novatchev wrote: > > > > translate() can only translate a character into another character or to > > nothing. It is not possible using translate() to translate a character > > into two or more characters. > > > > For such tasks it is convenient to use the "str-map" template from > > FXSL(...) > > ------------------------------ > > On 15 Nov 2003 at 13:48, Michael Kay wrote: > > > <xsl:variable name="quot">"</xsl:variable> > > <xsl:variable name="apos">'</xsl:variable> > > <xsl:value-of select="translate(., $quot, $apos)"/> > > ------------------------------ > > First of all, many thanks to Michael and Dimitre for replying to my message. > > I had actually thought of using variables, but besides the problem Dimitre pointed out, > I've read that in XSLT 1.1 the value of a variable *must* be contained in a 'select' > attribute, or else you'll be creating a result tree fragment, which in XSLT 1.1 would be > illegal. In other words, if I didn't want to write obsolete code, my variable would have to > look something like this: This is not "obsolete code" -- you should have tried running it before publishing such a wrong conclusion. ===== Cheers, Dimitre Novatchev. http://fxsl.sourceforge.net/ -- the home of FXSL XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Re: Escaping quotes in XP, Michael Kay | Thread | [xsl] Re: Escaping quotes in XPath , yguaba |
[xsl] XPATH, poppe chris | Date | [xsl] XSLTC (Translets) - Problems , Michael Brand |
Month |