protected void parseSyntax(Locator pLocator, String pSchemaLocation,
XsESchema pSchema)
throws SAXException, IOException, ParserConfigurationException {
XSContext data = getData();
try {
XsObjectFactory factory = data.getXsObjectFactory();
XMLReader xr = factory.newXMLReader(isValidating());
EntityResolver entityResolver = xr.getEntityResolver();
InputSource schemaSource = null;
if (entityResolver != null) {
schemaSource = entityResolver.resolveEntity(null, pSchemaLocation);
}
if (schemaSource == null) {
schemaSource = getInputSource(pLocator == null ? null : pLocator.getSystemId(),
pSchemaLocation);
}
XsSAXParser xsSAXParser = factory.newXsSAXParser(pSchema);
addSyntaxSchema(pSchema);
try {
data.setCurrentContentHandler(xsSAXParser);
xr.setContentHandler(xsSAXParser);
xr.parse(schemaSource);