Package org.iso_relax.verifier

Examples of org.iso_relax.verifier.VerifierFactory.compileSchema()


        this.type = type;

        try {
            VerifierFactory vf = VerifierFactory.newInstance(type.getLanguage());

            this.compiledSchema = vf.compileSchema(source);
        }
        catch (IOException e) {
            throw e;
        }
        catch (Exception e) {
View Full Code Here


            Verifier verifier = null;
            XdmNode schemaNode = schema.read();
            InputSource schemaSource = S9apiUtils.xdmToInputSource(runtime, schemaNode);
            schemaSource.setSystemId(schemaNode.getBaseURI().toASCIIString());

            Schema docSchema = vfactory.compileSchema(schemaSource);
            verifier = docSchema.newVerifier();
            verifier.setErrorHandler(new RNGErrorHandler());

            doc = source.read();
            docBaseURI = doc.getBaseURI();
View Full Code Here

        System.out.println("Loaded schema document: " + schemaURI);

        // use autodetection of schemas
        VerifierFactory factory = new com.sun.msv.verifier.jarv.TheFactoryImpl();
        Schema schema = factory.compileSchema(schemaURI);

        Verifier verifier = schema.newVerifier();
        verifier.setErrorHandler(new ErrorHandler() {
            public void error(SAXParseException e) {
                System.out.println("ERROR: " + e);
View Full Code Here

        System.out.println("Loaded schema document: " + schemaURI);

        // use autodetection of schemas
        VerifierFactory factory = new com.sun.msv.verifier.jarv.TheFactoryImpl();
        Schema schema = factory.compileSchema(schemaURI);

        Verifier verifier = schema.newVerifier();
        verifier.setErrorHandler(new ErrorHandler() {
            public void error(SAXParseException e) {
                System.out.println("ERROR: " + e);
View Full Code Here

        if(factory==null) {
            System.out.println("unable to find an implementation");
            return;
        }
       
        Schema schema = factory.compileSchema(args[1]);
        if(schema==null) {
            System.out.println("unable to parse this schema");
            return;
        }
       
View Full Code Here

                    .newRuntimeError("Could not parse document: "+ex.getMessage());
            }
        }

        try {
            return factory.compileSchema(is);
        } catch (VerifierConfigurationException ex) {
            throw context.getRuntime()
                .newRuntimeError("Could not parse document: "+ex.getMessage());
        } catch (SAXException ex) {
            throw context.getRuntime()
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.