xsl-list
[Top] [All Lists]

unparsed CDATA maintain HTML

2003-12-14 09:21:02
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



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