if ("application/relax-ng-compact-syntax".equals(schemaInput.getType())) {
sr = CompactSchemaReader.getInstance();
} else {
sr = new AutoSchemaReader();
}
return sr.createSchema(schemaInput, jingPropertyMap);
} catch (ClassCastException e) {
throw new SchemaReadException(String.format(
"Failed to resolve schema URL \"%s\".", schemaUrl));
}
}