Altova Mailing List Archives>Archive Index >xsl-list Archive Home >Recent entries >Thread Prev - [xsl] String literals with both single and double quotes [Thread Next] Re: [xsl] String literals with both single and double quotesTo: Date: 1/4/2007 11:32:00 AM Andrew Welch wrote: So does that mean in XPath 2.0 they can? 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 | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
