[xsl] unparsed CDATA maintain HTML

Subject: [xsl] unparsed CDATA maintain HTML
From: "George @dante" <dantetools@xxxxxxxxxxx>
Date: Sun, 14 Dec 2003 16:21:02 +0000
Hi there,

lets say for a reason (maybe a wrong one) we have an XML file that contains a text element

<text><![CDATA[I <i>have/<i> to add some <b>HTML</b> here is ]]></text>

and at the result XHTML I want to maintain these. I thought that CDATA should be enough and applying templates would maintain these but I get &lt; &gt; and that resulting to the <i>s and <b>s being shown as at the end

Is there an easy way around that ? (I could copy each element I guess individually but some of the them (eg. table) have many attributes and it would be complicated to redifene them all right ?)

Notice that sometimes:

<text>other things<elements>fdsds</elements></text>

but if there was a reason I could introduce a separate element say <unparsedText>

I am I doing it all wrong ?

Thanks,

George

_________________________________________________________________
Express yourself with cool emoticons - download MSN Messenger today! http://www.msn.co.uk/messenger



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



Current Thread