if it's available in 2.01, you might want to try and use an org.xml.sax.EntityResolver
instead of http://apache.org/xml/properties/schema/external-schemaLocation we have a common xsd that other xsd's ref using the <xsd:include schemaLocation=""/> tag we look for our unique url and the remap it to the internal file all other we let xerces handle. here's a good example. http://www-106.ibm.com/developerworks/xml/library/x-tipent.html -----Original Message----- From: Thropp, Shawn [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 26, 2003 8:48 AM To: '[email protected]'; '[EMAIL PROTECTED]' Subject: Settting Schema Locations Xerces Community/Developers: I've been successful in integrating the Xerces (2.01) DOMParser with Java code in order to perform parsing of wellformedness and validation to XSDs. My code is setup in the following manner: 1. DOMParser object created by passing in the StandardParserConfiguration() 2. The "http://xml.org/sax/features/validation" and "http://apache.org/xml/features/validation/schema" features set to true 3. The "http://apache.org/xml/properties/schema/external-schemaLocation" property set to the directory where the XSDs reside In my attempts to upgrade to a newer Xerces jar (2.0.2, 2.1.0., 2.2.0. 2.3.0), the following error occurs when validating against the XSDs: ERROR: schema_reference.4: Failed to read schema document '<xxx>.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>. My XML instance targets 3 XSDs - 2 of which contain import statements to other XSDs. The error message's text implies that it is hollering at these 2 XSDs with import statements while the stand-alone XSD is validated just fine. Does anybody know why this is happening? Could it be the way the DOMParser is being setup or have newer versions of Xerces implemented something new that I might be missing? Thanks in advance, Schawn --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
