Package com.volantis.mcs.xml.validation.sax.xerces

Examples of com.volantis.mcs.xml.validation.sax.xerces.XercesBasedDOMValidator


        try {
            JarFileEntityResolver repositorySchemaResolver =
                    RepositorySchemaResolverFactory.create();

            // create the validator
            validator = new XercesBasedDOMValidator(
                    repositorySchemaResolver,
                        errorReporter);
            // provide the validator with the schemas location
            validator.declareSchemaLocation(schemaLocation);
        } catch (SAXException e) {
View Full Code Here


            throws SAXException, ParserErrorException {

        // We must create the validator with an error reporter. Each
        // test will replace this error reporter with one that is
        // appropriate to its test.
        DOMValidator xercesBasedValidator = new XercesBasedDOMValidator(
                null, errorReporter);
        return xercesBasedValidator;
    }
View Full Code Here

                        // policy itself.
                        final MarkerGeneratingErrorReporter errorReporter =
                                new MarkerGeneratingErrorReporter(resource,
                                        node, null);
                        // create a validator
                        XercesBasedDOMValidator validator =
                                createDOMValidator(errorReporter);

                        // Add a UniqueAssetValidator to each of the dependent
                        // elements (if any) using the validator for this resource
                        UniqueAssetValidator.addValidatorToProvider(
                                node, validator);

                        // Add the layout constraints supplementary validator.
                        validator.addSupplementaryValidator(
                                MCSNamespace.LPDM.getURI(),
                                LayoutSchemaType.LAYOUT.getName(),
                                new LayoutConstraintsValidator());

                        // Add the layout duplicate name supplementary validator.
                        validator.addSupplementaryValidator(
                                MCSNamespace.LPDM.getURI(),
                                LayoutSchemaType.LAYOUT.getName(),
                                new DuplicateNameValidator());

                        // Validate the policy using the root element.
                        validator.validate(node);
                    }
                } catch (JDOMException e) {
                    // this exception is likely to occur if the DOM is badly
                    // formed. The user may be able rectify this by editing the
                    // file directly so we should add a marker that highlights
View Full Code Here

            throws SAXException, ParserErrorException {

        JarFileEntityResolver repositorySchemaResolver =
                RepositorySchemaResolverFactory.create();

        return new XercesBasedDOMValidator(repositorySchemaResolver,
                    errorReporter);
    }
View Full Code Here

TOP

Related Classes of com.volantis.mcs.xml.validation.sax.xerces.XercesBasedDOMValidator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.