Subject: Re: [xsl] CDATA elements in XSLT From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Tue, 25 May 2004 13:50:53 -0400 |
I am using a xslt transformation on an xml file which has this structure (... this is only a subset):
xml file: <AllWells> <Wells> <WellID>200-100</WellID> <PoolName>America & Brownie</PoolName> </Wells> <Wells> <WellID>200-110</WellID> <PoolName>Jiraffe & Breton</PoolName> </Wells> </AllWells>
xslt file: ....... <xsl:template match="Wells"> <element no_chars="?"> <xsl:value-of select="PoolName/text()"/> </element> </xsl:template>
The question is; How can I escape the & sign from the xml file to the xml output so I can write to the xml output: "America & Brownie" instead of having: "America & Brownie".
I also need to count on the number of characters for "America & Brownie" and not from "America & Brownie".
I have read about CDATA but doesn't seems to be the better solution. Could someone give me some advise on this ? Thank you.
-- Public courses: Spring 2004 world tour of hands-on XSL instruction Next: 3-day XSLT/XPath; 2-day XSL-FO - Birmingham, UK June 14,2004
World-wide on-site corporate, govt. & user group XML/XSL training. G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) Male Breast Cancer Awareness http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] CDATA elements in XSLT, Dario Romero | Thread | Re: [xsl] CDATA elements in XSLT, Wendell Piez |
[xsl] CDATA elements in XSLT, Dario Romero | Date | Re: [xsl] CDATA elements in XSLT, Wendell Piez |
Month |