RE: [xsl] Parsing of CDATA

Subject: RE: [xsl] Parsing of CDATA
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Wed, 8 Aug 2001 09:25:00 +0100
> 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


Current Thread