SAXParser parser = new SAXParser(symbolTable, grammarPool);
parser.setEntityResolver(er);
parser.setErrorHandler(eh);
try {
parser.setFeature("http://xml.org/sax/features/namespaces", true);
parser.setFeature("http://xml.org/sax/features/validation", true);
parser.setFeature("http://apache.org/xml/features/validation/schema", true);
parser.setFeature("http://apache.org/xml/features/validation/schema-full-checking", true);
InputSource in = new InputSource(docReader);
in.setSystemId(docUri);
parser.parse(in);
...
With the above, validation is always done from the DTD, ignoring the schema explicitly declared in the document with xsi:schemaLocation. If I change "http://xml.org/sax/features/validation" to false, no validation is done at all.
Help greatly appreciated!
Bob Foster
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
