private void readSchema(String schemaResource) throws IllegalAccessException, InstantiationException, ClassNotFoundException, EPException, URISyntaxException { URL url = ResourceLoader.resolveClassPathOrURLResource("schema", schemaResource); String uri = url.toURI().toString(); // Uses Xerxes internal classes DOMImplementationRegistry registry = DOMImplementationRegistry.newInstance(); registry.addSource(new DOMXSImplementationSourceImpl()); XSImplementation impl =(XSImplementation) registry.getDOMImplementation("XS-Loader"); XSLoader schemaLoader = impl.createXSLoader(null); xsModel = schemaLoader.loadURI(uri); if (xsModel == null) { throw new EPException("Failed to read schema via URL '" + schemaResource + '\''); } }
registry.addSource(new DOMXSImplementationSourceImpl()); Object xsImplementation = registry.getDOMImplementation("XS-Loader"); if (xsImplementation == null) {