data = StreamUtils.read(xsdStream);
} finally {
xsdStream.close();
}
Map<URI, byte[]> s = XSUtils.captureSchema(URI.create("schema.xsd"), data, new XMLEntityResolver() {
public XMLInputSource resolveEntity(XMLResourceIdentifier resourceIdentifier) throws XNIException, IOException {
XMLInputSource src = new XMLInputSource(resourceIdentifier);
String literalUri = resourceIdentifier.getLiteralSystemId();
if (literalUri != null) {