This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: CDATA in XML->XML transformation
- To: "'xsl-list at lists dot mulberrytech dot com'" <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] CDATA in XML->XML transformation
- From: "Casadome, Francisco Javier" <Francisco dot Casadome at bowneglobal dot es>
- Date: Tue, 25 Sep 2001 18:48:28 +0200
- Reply-To: xsl-list at lists dot mulberrytech dot com
Hi Thomas,
Try this:
<xsl:template match="Action">
<solution>
<xsl:text
disable-output-escaping="yes"><![CDATA[</xsl:text>
<xsl:apply-templates select="text()|i|b" />
<xsl:text disable-output-escaping="yes">]]></xsl:text>
</solution>
</xsl:template>
Cheers,
Frank.
-----Original Message-----
From: me [mailto:info@alternize.com]
Sent: martes, 25 de septiembre de 2001 18:20
To: XSL-List@lists.mulberrytech.com
Subject: [xsl] CDATA in XML->XML transformation
hi list
i came across the following problem: i need to transform an XML file into
a different XML file. one element needs to be defined as CDATA in the
second XML file.
right now i got
<xsl:template match="Action">
<solution><xsl:apply-templates select="text()|i|b" /></solution>
</xsl:template>
which produces an output like
<solution>this is a <i>nice</i> test</solution>
but now i need the output to be a CDATA section, as i don't want the
<i></i> part being parsed further, eg the output must look like
<solution><![CDATA[this is a <i>nice</i> test]]></solution>
right now i got no clue whatsoever how to include "<![CDATA[" and "]]>"
through the XSL file...
any help is very appreciated!
thanks
Thomas
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list