return schema; if (collection.check(key)) { collection.push(key); try {
/** * Resolve the schemas * @param targetNamespace * @param schemaLocation */ XmlSchema resolveXmlSchema(String targetNamespace, String schemaLocation, String baseUri, TargetNamespaceValidator validator) { //use the entity resolver provided InputSource source = collection.schemaResolver. resolveEntity(targetNamespace,schemaLocation,baseUri); final String systemId = source.getSystemId() == null ? schemaLocation : source.getSystemId(); final SchemaKey key = new XmlSchemaCollection.SchemaKey(targetNamespace, systemId); XmlSchema schema = collection.getSchema(key); if (schema != null) { return schema; } if (collection.check(key)) { collection.push(key); try { return collection.read(source, null, validator); } catch (Exception e) { throw new RuntimeException(e); } finally { collection.pop(); } } return null; }
return schema; if (collection.check(key)) { collection.push(key); try {