xsl-list
[Top] [All Lists]

[xsl] problem with processing CDATA tags in xml

2010-04-08 06:18:19
Hi all,

I have a problem processing following tag:

The original tag before transformation was:
<Value><![CDATA[G<sub>p(max)</sub> is the maximum power gain, if K > 1. If K < 
1 then G<sub>p(max</sub> = MSG.]]></Value>

After transformation it becomes like below (which is the input from which I 
need to continue processing) <Value>G&lt;sub&gt;p(max)&lt;/sub&gt; is the 
maximum power gain, if K &gt; 1. If K &lt; 1 then 
G&lt;sub&gt;p(max)&lt;/sub&gt; = MSG.</Value>


My customer wants to use <sub> and <sup> tags so in the rendition it's 
formatted nicely.

Normally this did not cause any problems but now they have a mix of <sub> tags 
and '>' (greather then)  and '<' (smaller then)...

When I use <xsl:value-of select="." disable-output-escaping="yes"/>  I get 
invalid xml for this particular case.


Does anyone have a bright idea how to solve these kinds of problems in a nice 
way?

Thx in advance,
Robby

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--