RE: [xsl] Quotes in a variable

Subject: RE: [xsl] Quotes in a variable
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Tue, 24 Jan 2006 19:09:54 -0000
This is one case where it's easier to use the RTF form:

<xsl:variable name="x">value</xsl:variable>

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

> -----Original Message-----
> From: Fraser Goffin [mailto:goffinf@xxxxxxxxxxx] 
> Sent: 24 January 2006 18:32
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: [xsl] Quotes in a variable
> 
> I'm trying to create a variable that contains an XPath 
> expression and that 
> expression contains several quotes. I'm going to be 
> outputting the value of 
> this variable so I don't want to escape them with &quot;. Is 
> it doable ?
> 
> For example: this obviously 'barfs' because there are too 
> many ' in the 
> select attribute value :-
> 
> <xsl:variable name="anXPath" 
> select="'//*[local-name()='MessageID' and 
> namespace-uri()='http://schemas.xmlsoap.org/ws/2004/03/addressing']'"
> 
> Cheers
> 
> Fraser.

Current Thread