-
Bug
-
Resolution: Not an Issue
-
P3
-
6
-
generic
-
generic
Reported on java.net: https://jaxp.dev.java.net/issues/show_bug.cgi?id=11
i just made my first steps with jre 1.6b2 and found the following problem:
validator.validate(new DOMSource(node));
always throws a SAXException ("cannot find the declaration of element ROOT")
this happens in all my programs where i try to validate a xml file with a schema
xsd file ...
but this does not happen with jre 1.5 or jre 1.4.2_12 (jaxp 1.3.2 endorsed) or
even with jre 1.6b2 (jaxp 1.3.2 endorsed)
On further examination it turned out that the commenter was attempting to validate documents parsed with namespace support turned off. Namespace support is a prerequisite of XML Schema validation. Turning on namespace support made the bug go away.
So the real bug is that it ever worked at all in 1.3, but I'm not going to go chasing that one.
i just made my first steps with jre 1.6b2 and found the following problem:
validator.validate(new DOMSource(node));
always throws a SAXException ("cannot find the declaration of element ROOT")
this happens in all my programs where i try to validate a xml file with a schema
xsd file ...
but this does not happen with jre 1.5 or jre 1.4.2_12 (jaxp 1.3.2 endorsed) or
even with jre 1.6b2 (jaxp 1.3.2 endorsed)
On further examination it turned out that the commenter was attempting to validate documents parsed with namespace support turned off. Namespace support is a prerequisite of XML Schema validation. Turning on namespace support made the bug go away.
So the real bug is that it ever worked at all in 1.3, but I'm not going to go chasing that one.