void addSchema(Source schema) {
assert schema.getSystemId() != null;
String systemId = schema.getSystemId();
try {
XMLStreamBufferResult xsbr = XmlUtil.identityTransform(schema, new XMLStreamBufferResult());
SDDocumentSource sds = SDDocumentSource.create(new URL(systemId), xsbr.getXMLStreamBuffer());
SDDocument sdoc = SDDocumentImpl.create(sds, new QName(""), new QName(""));
docs.put(systemId, sdoc);
nsMapping.put(((SDDocument.Schema)sdoc).getTargetNamespace(), sdoc);
} catch(Exception ex) {
LOGGER.log(Level.WARNING, "Exception in adding schemas to resolver", ex);