This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Parsing of CDATA
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] Parsing of CDATA
- From: "Michael Kay" <mhkay at iclway dot co dot uk>
- Date: Wed, 8 Aug 2001 09:25:00 +0100
- Reply-To: xsl-list at lists dot mulberrytech dot com
> Is there a way of parsing 'out' the contents of
> a CDATA section, inside a stylesheet ?
>
> e.g.
>
> xml fragment:
> <NAME><![CDATA[<LANG>Previous</LANG>]]></NAME>
>
No (except by invoking an XML parser via an extension function).
This habit of putting markup inside a CDATA section is to be strongly
discouraged. The purpose of CDATA is to tell the parser that the "<" and ">"
are ordinary data characters, not special markup characters. Using CDATA to
hold XML is therefore always going to cause trouble.
Mike Kay
Software AG
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list