System.setProperty(DOMImplementationRegistry.PROPERTY,
"org.apache.xerces.dom.DOMXSImplementationSourceImpl");
DOMImplementationRegistry registry = DOMImplementationRegistry.newInstance();
XSImplementation impl = (XSImplementation)registry.getDOMImplementation("XS-Loader");
XSLoader schemaLoader = impl.createXSLoader(null);
schemaLoader.getConfig().setParameter("validate", Boolean.TRUE);
schemaLoader.getConfig().setParameter("error-handler", new DOMErrorHandler() {
public boolean handleError(DOMError error) {
LOG.info("Schema parsing error: " + error.getMessage()