Hi Nick, While I'm not sure about the challenge you're having with setting features on an XMLGrammarLoader (as it does have a setFeature() method) I'd recommend that you use the JAXP Validation API [1]. In particular take a look at SchemaFactory. A call to newSchema() will check all of the constraints on the schema documents being processed.
Thanks. [1] http://xerces.apache.org/xerces2-j/javadocs/api/javax/xml/validation/package-summary.html Michael Glavassevich XML Parser Development IBM Toronto Lab E-mail: mrgla...@ca.ibm.com E-mail: mrgla...@apache.org Nick Ardlie <nicholas.ard...@immi.gov.au> wrote on 05/28/2009 12:24:13 AM: > > Is there a way to set the > "http://apache.org/xml/features/honour-all-schemaLocations" feature on the > underlying parser used by an XMLGrammarLoader (or another way to achieve an > equivalent outcome)? > > I'm using the XMLGrammarLoader for programmatic validation of XML schemas > but its failing to pick up cases where multiple import statements are > included and a later import statement has an incorrect path (but a former > import has already bound components to that namespace via a nested import - > with a correct path). > > Or is there a better way to programmatically validate schemas (in the > absence of an instance document) in Xerces-J (and still assert the > honour-all-schemaLocations feature behaviour)? > > Regards, > Nick. > -- > View this message in context: http://www.nabble.com/Applying-honour- > all-schemaLocations-semantics-to-XMLGrammarLoader-tp23755010p23755010.html > Sent from the Xerces - J - Dev mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: j-dev-unsubscr...@xerces.apache.org > For additional commands, e-mail: j-dev-h...@xerces.apache.org