try {
URILocation location = resolver.resolve(uri, null);
if (location != null) uri = location.toString();
}
catch(URIException except) {
throw new NestedIOException(except);
}
state.markAsProcessed(uri, schemaUnmarshaller.getSchema());
}
Sax2ComponentReader handler
= new Sax2ComponentReader(schemaUnmarshaller);
_parser.setDocumentHandler(handler);
if (_errorHandler == null)
_parser.setErrorHandler(handler);
else
_parser.setErrorHandler(_errorHandler);
if (_resolver != null)
_parser.setEntityResolver(_resolver);
_parser.parse(_source);
}
catch(XMLException ex) {
handleException(ex);
}
catch(org.xml.sax.SAXException sx) {
handleException(sx);
}
_schema = schemaUnmarshaller.getSchema();
if (_validate) {
try {
_schema.validate();
}
catch(org.exolab.castor.xml.ValidationException vx) {
throw new NestedIOException(vx);
}
}
return _schema;