JingResolver context = new JingResolver(sourceResolver, entityResolver);
InputSource input = context.resolveSource(source);
try {
/* Create a simple property map builder */
PropertyMapBuilder builder = new PropertyMapBuilder();
ValidateProperty.ENTITY_RESOLVER.put(builder, context);
ValidateProperty.XML_READER_CREATOR.put(builder, context);
ValidateProperty.ERROR_HANDLER.put(builder,
DraconianErrorHandler.INSTANCE);
PropertyMap validatorProperties = builder.toPropertyMap();
/* Parse, rewrap, and return the schema */
final com.thaiopensource.validate.Schema schema;
schema = schemaReader.createSchema(input, validatorProperties);
return new JingSchema(schema, context.close());