}
}
protected XsESchema parseSyntax(InputSource pSource)
throws SAXException, IOException, ParserConfigurationException {
XSContext data = getData();
try {
XsObjectFactory factory = data.getXsObjectFactory();
XsESchema mySchema = factory.newXsESchema();
XsSAXParser xsSAXParser = factory.newXsSAXParser(mySchema);
addSyntaxSchema(mySchema);
try {
data.setCurrentContentHandler(xsSAXParser);
XMLReader xr = factory.newXMLReader(isValidating());
xr.setContentHandler(xsSAXParser);
EntityResolver entityResolver = xr.getEntityResolver();
if (entityResolver != null) {
InputSource iSource = entityResolver.resolveEntity(pSource.getPublicId(), pSource.getSystemId());
if (iSource != null) {
pSource = iSource;
}
}
xr.parse(pSource);
return (XsESchema) xsSAXParser.getBean();
} finally {
removeSyntaxSchema();
}
} finally {
data.setCurrentContentHandler(null);
}
}