You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Maxim Khaikine <m....@berensp.com> on 2000/05/02 18:27:53 UTC

Question: translation of "<" and ">" in CDATA-section

Hi!

Could you help me please with the problem I have with the CDATA section.

If I put some special characters like '<' or '>' in a CDATA section, it
will be translated into the
corresponding "&lt;" and "&gt;" entities. What kind of settings are
needed to avoid this effect?

I work with WindowsNT 4.0, Sun jdk 1.2.2.
For testing I used your example "SimpleTransform.java". My changed
"foo.xml" file looks like this:

////////////////////////////////////////////////////////////////////////////////////

?xml version="1.0"?>
<doc>
Hello
<![CDATA[<A href...>]]>
</doc>
///////////////////////////////////////////////////////////////////////////////////

the output is:

<?xml version="1.0" encoding="UTF-8"?>
<out>
Hello
&lt;A href...&gt;
</out>