Using JAXP I can create a Schema object. e.g.
Path schemaPath = ...;
StreamSource source = new StreamSource(schemaPath.toFile());
SchemaFactory factory =
SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
Schema schema = factory.newSchema(source);
I am using Xerces. Is there way to obtain the XSModel (org.apache.xerces.xs.XSModel) corresponding to the schema object?