public static Map<URI, byte[]> captureSchema(URI systemURI, String schemaData,
XMLEntityResolver resolver) throws XsdException {
if (__log.isDebugEnabled())
__log.debug("captureSchema(URI,Text,...): systemURI=" + systemURI);
DOMInputImpl input = new DOMInputImpl();
input.setSystemId(systemURI.toString());
input.setStringData(schemaData);
Map<URI, byte[]> ret = captureSchema(input, resolver);
// Let's not forget the root schema.
try {
// TODO don't assume UTF-8 - but which encoding is required?