Examples of XercesBasedDOMValidator


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

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

            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

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

                        // 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

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

            throws SAXException, ParserErrorException {

        JarFileEntityResolver repositorySchemaResolver =
                RepositorySchemaResolverFactory.create();

        return new XercesBasedDOMValidator(repositorySchemaResolver,
                    errorReporter);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.