This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Copy CDATA nodes from XML to XML format w/ XALAN
- From: "Michael Kay" <michael dot h dot kay at ntlworld dot com>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Sun, 3 Mar 2002 21:34:50 -0000
- Subject: RE: [xsl] Copy CDATA nodes from XML to XML format w/ XALAN
- Reply-to: xsl-list at lists dot mulberrytech dot com
> I am trying to transform XML to XML with included CDATA and
> keep that CDATA node enclosed with a CDATA tag.
>
CDATA is not part of the XML information set or of the XPath data model.
It's simply a convenient way of entering text that avoids having to escape
all the "<" characters as "<". Therefore, CDATA boundaries can't be
preserved through the transformation.
But you can indicate that you want CDATA used in the output using the
cdata-section-elements attribute of xsl:output.
Michael Kay
Software AG
home: Michael.H.Kay@ntlworld.com
work: Michael.Kay@softwareag.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list