Subject: [xsl] Escaping quotes in XPath expressions From: yguaba@xxxxxxxxxxxx Date: Sat, 15 Nov 2003 10:55:22 -0200 |
Hello all, Can anyone please tell me how I can escape a single-quote in an XPath expression such as the one below? <xsl:value-of select="translate(normalize-space(.), 'x', 'y')"/> If I use 'x' and 'y' as the search and replace arguments, everything works well. But I need to search for single-quotes and replace them with backslash + single-quote. In other words, my XPath expression would look something like this: translate(normalize-space(.), ''', '\'') Except, of course, that I can't use a single-quote (character) between two single-quotes (string delimiters). Backslashes don't escape anything, of course, and using XML entities (") inside the search and replace strings won't work either. But I just feel there must be a way to do this... Thanks, Erik XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: RE: RE: RE: [xsl] Malformed (??, Guillaume LECERF | Thread | RE: [xsl] Escaping quotes in XPath , Michael Kay |
RE: RE: RE: RE: [xsl] Malformed (??, Guillaume LECERF | Date | RE: [xsl] Escaping quotes in XPath , Michael Kay |
Month |