// build DOMForest just like we handle XML Schema
DOMForest forest = buildDOMForest( new XMLSchemaInternalizationLogic() );
DOMForestScanner scanner = new DOMForestScanner(forest);
XSOMParser xsomParser = createXSOMParser( forest );
// find <xsd:schema>s and parse them individually
for( InputSource grammar : opt.getGrammars() ) {
Document wsdlDom = forest.get( grammar.getSystemId() );
NodeList schemas = wsdlDom.getElementsByTagNameNS(XMLConstants.W3C_XML_SCHEMA_NS_URI,"schema");
for( int i=0; i<schemas.getLength(); i++ )
scanner.scan( (Element)schemas.item(i), xsomParser.getParserHandler() );
}
return xsomParser.getResult();
}