[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] Treat CDATA section content as node


Subject: [xsl] Treat CDATA section content as node
From: Karl Stubsjoen <kstubs@xxxxxxxxx>
Date: Wed, 24 Feb 2010 22:15:14 -0700

Is it possible to treat the content in a CDATA section as a node or
set of nodes?  The xml I am working with puts HTML markup in a CDATA
section.  Of course, these items are intended to simply copy as-is,
but I wish to translate the html into something else.

So you might have:

<xyz><![CDATA[<p>a paragraph</p><p>a paragraph</p><p>a paragraph</p>]]></xyz>

Maybe I want to tranlsate the <p> tags into <div> tags.  Any way to
set up a match on this, maybe use of node-set() function?

Looking for XSL 1.0 solution.

Thanks,
Karl..


Current Thread
Keywords