Identity Constraint Validation 2004-04-15 - By Thamm, Russell
Hi,
can anyone tell me the secret of getting Xerces-J to perform full schema validation, in particular to check Identity Constraints.
This is my code (hand copied so may have typos)
DOMParser parser = new DOMParser(); try { Errors errors = new Errors(); parser.setFeature("http://apache.org/xml/features/defer-node-expansion" ,false); parser.setFeature("http://apache.org/xml/features/validation/schema",true); parser.setFeature("http://apache.org/xml/features/validation/schema-full -checking",true); parser.setErrorHandler(errors); parser.parse("c:\\chk.xml"); } catch (Exception ex) { ex.printStackTrace(); }
Even though my source file contains Identity Constraint errors, I get none reported.
If I load this file into jEdit (with XML plugin), the Identity Constraint errors are reported. Strangely the jEdit XML plugin uses the same version of Xerces-J that I do (2.6.0). However jEdit uses the SAX parser.
thanks Russell Thamm
--------------------------------------------------------------------- To unsubscribe, e-mail: xerces-j-user-unsubscribe@(protected) For additional commands, e-mail: xerces-j-user-help@(protected)
|
|