[exslt] CDATA and Internal Entities

54van7 54van7 at securityisdead.com
Fri May 1 10:28:15 MDT 2009


Hello,
   Firstly, I'm both new to the list and *relatively* new to XSLT, but
have found exslt.org extenstions to be critically helpful.

I understand the intended implementation of CDATA sections is to
preserve textual formatting, yet keep the XML valid...but I have
encountered a frustrating situation where the CDATA section already
contains appropriately escaped internal entities.

Question:

Is there a way to display internal entities within CDATA sections as
their literal equivalent via XSLT? (I.E. I can easily create a parsing
routine in language X to handle this out of band, but I'd like to
transform this markup natively in XSL, *hopefully* using an exslt
function or a custom template)

Sample XML:

<node>
<![CDATA[
&lt;foo&nbsp;bar=&quot;baz&quot;/&gt;
]]>
</node>

Intended Output:
<foo bar="baz"/>

I have created a couple xsl:fo files that generate pdf's from
auto-generated XML that contains this markup - and cannot for the life
of me figure out how to display these sections properly.

Many thanks for any assistance to a desperate man,
Joe


More information about the exslt mailing list