|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: String literals with both single and double quotes
Andrew Welch wrote:
Yes. You can escape a single quote (apostrophe) or a double quote by doubling it, depending on the containing quotes. I.e., if your string is contained in single quotes, you can double a single quote to escape it. In a value-of select expression, it looks like this. where the single quote is escaped: <xsl:value-of select=" ' dquote: " and squote: '' ' " /> This selects the following: dquote: " and squote: ' In XSLT literal attributes this is -- of course -- not possible due to restrictions of XML: <xsl:output-character character="1" string=" "" "/> but here escaping isn't needed at all (but this is not XPath, but XSLT): <xsl:output-character character="1" string=" " "/> Cheers, -- Abel http://www.nuntia.nl
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|






