systemId = pathBuilder.toString();
log.info("Resolving schema with publicId [" + publicId + "] and systemId [" + systemId + "]");
try {
for (int i = 0; i < schemas.length; i++) {
XmlSchema schema = schemas[i];
if (schema.getSourceURI() != null && schema.getSourceURI().endsWith(systemId)) {
try {
return new InputSource(getSchemaAsReader(schemas[i]));
} catch (IOException e) {
throw new RuntimeException(e);
}
}
}
for (int i = 0; i < schemas.length; i++) {
XmlSchema schema = schemas[i];
if (schema.getTargetNamespace() != null && schema.getTargetNamespace().equals(publicId)) {
try {
return new InputSource(getSchemaAsReader(schemas[i]));
} catch (IOException e) {
throw new RuntimeException(e);
}