xsl-list
[Top] [All Lists]

RE: CDATA question

2004-04-14 15:39:13
Desired Output
<material>
<mattext texttype="text/html"><![CDATA[Select the <b>GPO Part 
Additional
Info</b> link in the <b>Navigation</b>screen.]]></mattext>
</material>

You need to recognize that the angle brackets in this CDATA section are
ordinary characters, they are not markup. The string "<b>Navigation</b>" is
therefore just a string, it is not a representation of an element node.
That's the only purpose of CDATA sections: to tell the parser that angle
brackets are ordinary characters and not markup. So if this is really the
output you want, you will need to generate it as:

&lt;b&gt;<xsl:apply-templates/>&lt;/b&gt;


Michael Kay



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