Hey Elisha, Elisha Berns wrote:
Well my question again is how best to use Xerces to validate XSDs? What isn't clear from the blog is the degree of fuzziness involved when Xerces does successfully 1) load an XSD schema, 2) load an XML document that has a schema when full schema checking is turned on. Is there a more formal way to quantify what Xerces can validate and cannot validate? I don't even know if the W3C has validation or conformance levels, but that's what it sounds like here. Otherwise it seems like validation in Xerces is some kind of crap shoot!
Well Xerces performs checking of instances against schemas and has had a considerable amount of testing doing that very task. I would trust it 99% to do that (not 100% as we occasionally get bugs). I have a certain amount less confidence about checking to see if a schema is correct. This does not really mean we don't conform to the Schema spec, but rather we have a very high degree of confidence that if you give us a valid schema then we will validate the document correctly. Even in Xerces J, which has a larger user base than C there have been a couple of reports over the last month.
But my question is, once again, assuming that you are only using Xerces, what is the best and most thorough way to validate an XSD?
I would set schema full checking on (see http://xml.apache.org/xerces-c/program-dom.html, the property is http://apache.org/xml/features/validation/schema-full-checking) and I would parse the schema grammar using loadGrammar after setting the error handler.
Thanks for any more clarity here,
No problem. I hope this is more clear. Cheers, Gareth -- Gareth Reakes, Managing Director Parthenon Computing +44-1865-811184 http://www.parthcomp.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
