This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Accessing /ROOT/NODE's CDATA content


> At the moment my CDATA section appears to
> be accessible only through the text() function
> - is that as it should be?

The XSLT/XPath specs take the view that CDATA sections are a purely lexical
device, just like entity references, the logical tree structure is what you
get after expanding the CDATA sections.

The use of CDATA, or any other device, to embed a marked-up HTML document
within an XML document is something the XSLT standard doesn't handle
particularly well. If you want to pass it through transparently, you can
achieve that with disable-output-escaping="yes". If you want to process the
embedded document's structure, you need to call out to an external function
that parses the text and returns it as a tree.

Mike Kay


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]