public XMLValidationSchema loadSchemas(String baseURI,
Map<String, EmbeddedSchema> sources) throws XMLStreamException {
parserFactory = getSaxFactory();
ResolvingGrammarReaderController ctrl = new ResolvingGrammarReaderController(baseURI, sources);
xmlSchemaReader = new XMLSchemaReader(ctrl, parserFactory);
multiSchemaReader = new MultiSchemaReader(xmlSchemaReader);
for (EmbeddedSchema source : sources.values()) {
DOMSource domSource = new DOMSource(source.getSchemaElement());
domSource.setSystemId(source.getSystemId());
multiSchemaReader.parse(domSource);