public static Map<URI, byte[]> captureSchema(URI systemURI, byte[] schemaData,
XMLEntityResolver resolver, int localSchemaId) throws XsdException {
if (__log.isDebugEnabled())
__log.debug("captureSchema(URI,Text,...): systemURI=" + systemURI);
DOMInputImpl input = new DOMInputImpl();
input.setSystemId(systemURI.toString());
input.setByteStream(new ByteArrayInputStream(schemaData));
Map<URI, byte[]> ret = captureSchema(input, resolver);
URI localURI = localSchemaId == 0 ? systemURI : URI.create(systemURI.toString() + '.' + localSchemaId);
ret.put(localURI, schemaData);