-
Bug
-
Resolution: Fixed
-
P4
-
1.3.0
-
1.1fcs
-
generic
-
generic
-
Verified
Name: skT45625 Date: 07/31/2000
java version "1.2.2"
HotSpot VM (1.0.1, mixed mode, build f)
The JAXP 1.0.1 validating parser seems to "expand" CDATA sections
when it is parsing them. Taking a look at the following example:
test.dtd:
<!ELEMENT A(#PCDATA)>
test.xml:
<!DOCTYPE A SYSTEM "file:test.dtd">
<A> <![CDATA[Hello]]> abcd <![CDATA[World]]> < <![CDATA[xyz]]> </A>
When the JAXP validating parser parses the above and the output
is write out, the product is:
<A> <![CDATA[Hello abcd ]]><![CDATA[World ]]>< <![CDATA[xyz ]]></A>
It seems that the CDATA sections are expanded to include all characters
before the next CDATA section, a character reference, or an end tag.
p.s. It would be useful if you add an XML category to the bug list
above (and on the previous page). I could not find an appropriate
place to file this bug.
ALso, I tried to include the character reference "<", but it might
be converted to the character "<" when submitted.
(Review ID: 107768)
======================================================================