I'm trying to use the Validator class to validate XML documents
againts a supplied XSD file.
I was having problems with getting no errors on obvioulsy invalid XML.
I have tracked it down to DTD processing.
IF I have an XML document with a DOCTYPE like this:
<!DOCTYPE PLAY SYSTEM "play.dtd">
And the document validates against the DTD, the Validator seems to be ignoring
the schema I pass in. If I remove the DOCTYPE then the Validator accepts the
schema and properly reports errors.
Interestingly, if instead of Validater I use the SAXParser and then set the
schema properties it works as expected and validates using my supplied XSD
reguardless of if there is a DTD present.
I can provide full code if useful. Does this ring a bell to anyone ? Is there
a feature or property I must set to tell Validator to use my XSD even if there
is a DTD present in the XML ?
Thanks for any suggestions.
--
David A. Lee
d...@calldei.com
http://www.xmlsh.org