This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Escaping characters from my XML
- To: "'xsl-list at mulberrytech dot com'" <xsl-list at mulberrytech dot com>
- Subject: RE: Escaping characters from my XML
- From: Kay Michael <Michael dot Kay at icl dot com>
- Date: Thu, 28 Sep 2000 13:19:56 +0100
- Reply-To: xsl-list at mulberrytech dot com
> My XML looks like this: <name>John "J" Smith </name>
> My XSL looks like this: var myVariable = "<xsl:value-of
> select="name"/>"
> What's rendered is : var myVariable = "John "J" Smith"
>
> Some how I need to deal with the fact that there are quotes
> in my data.
If you want to replace the quotes with another single character, use
translate(). To replace it with a longer string, you need to write a
recursive template, which isn't too difficult: there are examples in the
FAQ, I think.
Mike Kay
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list