Hi!

I encountered the following problem, while using xerces j:

Validating a single file works perfect. But when I want to read two xml files which are based on two different xsd files, I get a validation error.

I think, xerces wants to validate the second xml file with the first xsd. Although its based on the second one.

But I don't know why xerces always uses only the first xsd.

I tried it with a reference to the xsd within the xml file:
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:noNamespaceSchemaLocation="../INSERT-FILENAME-HERE.xsd"



and in java itself:
DOMImplementationAS di = (DOMImplementationAS)ASDOMImplementationImpl.getDOMImplementation();
DOMASBuilder parser = di.createDOMASBuilder();


parser.setErrorHandler(new MyDOMErrorHandler());
parser.setFeature(PathConfig.NAMESPACES_FEATURE_ID, true);
parser.setFeature(PathConfig.VALIDATION_FEATURE_ID, true);
parser.setFeature(PathConfig.SCHEMA_VALIDATION_FEATURE_ID, true);
parser.setFeature(PathConfig.SCHEMA_FULL_CHECKING_FEATURE_ID, true);
doc = parser.parseURI(fileName);


Both ways -> the same problem.


Can somebody help me ;-) ?

Thanx,
Stefan


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to