xerces ignores reader.setProperty(SCHEMA_LOCATION_PROPERTY,"path/to/xsd")

2011-08-10 Thread Papendieck, Thomas
Hi, sometimes I get documents where 'schemaLocation' is set to an absolute path on the file creators computer. In this cases validation of the document fails because the xsd cannnot be found at that location on my computer. I tried to pass the location on my computer via XMLReader reader = XM

RE: xerces ignores reader.setProperty(SCHEMA_LOCATION_PROPERTY,"path/to/xsd")

2011-08-10 Thread Newman, John W
I think you want to do: reader.setEntityResolver(new EntityResolver() { @Override public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException { InputSource result = null; // res

AW: xerces ignores reader.setProperty(SCHEMA_LOCATION_PROPERTY,"path/to/xsd")

2011-08-10 Thread Papendieck, Thomas
Hello John, that was fast... ;o) > public InputSource resolveEntity(String publicId, String systemId) Am I right that 'systemId' is (in my case) the path to the xsd as found in the 'xsi:schemaLocation' attribute? bye Thomas -

RE: xerces ignores reader.setProperty(SCHEMA_LOCATION_PROPERTY,"path/to/xsd")

2011-08-10 Thread Newman, John W
I believe so yes .. but I'm not 100% Fire that up in the debugger and see what you get. Or just add some log statements to see when it's getting called and what values you're getting for public id / system id -Original Message- From: Papendieck, Thomas [mailto:thomas.papendi...@opitz-