/** * registers bunch of schemas located in the schemaUri folder * * @param modelUri String; the folder containing schemas to register * @throws BagriException in case of any error */ @Override public void registerModelUri(String modelUri) throws BagriException { XSImplementation impl = new XSImplementationImpl(); XSLoader schemaLoader = impl.createXSLoader(null); XSModel schema = schemaLoader.loadURI(modelUri); processModel(schema); }
XSLoader xsLoader = XS_IMPL.createXSLoader(null); xsLoader.getConfig().setParameter(Constants.DOM_VALIDATE, Boolean.TRUE);
impl = XSImplementationImpl.getDOMImplementation(); if (testImpl(impl, features)) { implementations.add(impl);
/** * A method to request a DOM implementation. * @param features A string that specifies which features are required. * This is a space separated list in which each feature is specified * by its name optionally followed by a space and a version number. * This is something like: "XML 1.0 Traversal Events 2.0" * @return An implementation that has the desired features, or * <code>null</code> if this source has none. */ public DOMImplementation getDOMImplementation(String features) { DOMImplementation impl = super.getDOMImplementation(features); if (impl != null){ return impl; } // if not try the PSVIDOMImplementation impl = PSVIDOMImplementationImpl.getDOMImplementation(); if (testImpl(impl, features)) { return impl; } // if not try the XSImplementation impl = XSImplementationImpl.getDOMImplementation(); if (testImpl(impl, features)) { return impl; } return null; }
XSImplementation impl = new XSImplementationImpl(); XSLoader schemaLoader = impl.createXSLoader(null);