xsl-list
[Top] [All Lists]

RE: CDATA - Can I have XML ?

2003-03-07 00:10:30
Hi,

  Is it possible possible to parse the XML data which is 
under CDATA tag in
a XSL?

You mean *inside* CDATA section, not *under* as in follows in document order?

Anyhow - No. Use an extension funtion (Saxon has one, I believe) to parse the 
text into a node-set, or use e.g. something like this

  <xsl:variable name="parsed-cdata" 
select="document(concat('http://localhost/foo?data=', 
element-that-contains-the-xml))" />

where foo returns the contents of data parameter with MIME-type text/xml, or 
use e.g. sed to remove the CDATA section delimiters, or just fix the source XML 
as if your data is inside a CDATA section, it's just text, not XML markup.

Cheers,

Jarno - Delerium: Koran

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



<Prev in Thread] Current Thread [Next in Thread>