Examples of compileSchema()


Examples of com.caucho.relaxng.CompactVerifierFactoryImpl.compileSchema()

      // VerifierFactory factory = VerifierFactory.newInstance("http://caucho.com/ns/compact-relax-ng/1.0");

      CompactVerifierFactoryImpl factory;
      factory = new CompactVerifierFactoryImpl();

      return factory.compileSchema(path);
    } catch (IOException e) {
      throw e;
    } catch (Exception e) {
      throw ConfigException.create(e);
    }
View Full Code Here

Examples of com.sun.msv.verifier.jarv.XSFactoryImpl.compileSchema()

                                "xml.xsd"));
                        System.out.println("unexpected system ID: "+systemId);
                        return null;
                    }
                });
                xmlSchema4XmlSchema = factory.compileSchema(
                        XMLSchemaReader.class.getResourceAsStream("xmlschema.xsd"));
            } catch( Exception e ) {
                e.printStackTrace();
                throw new Error("unable to load schema-for-schema for W3C XML Schema");
            }
View Full Code Here

Examples of com.sun.msv.verifier.jarv.XSFactoryImpl.compileSchema()

                                "xml.xsd"));
                        System.out.println("unexpected system ID: "+systemId);
                        return null;
                    }
                });
                xmlSchema4XmlSchema = factory.compileSchema(
                        XMLSchemaReader.class.getResourceAsStream("xmlschema.xsd"));
            } catch( Exception e ) {
                e.printStackTrace();
                throw new Error("unable to load schema-for-schema for W3C XML Schema");
            }
View Full Code Here

Examples of org.apache.cocoon.components.validation.SchemaFactory.compileSchema()

            Source schemaSrc = getSourceResolver().resolveURI(schDoc);

            try {
                InputSource is = SourceUtil.getInputSource(schemaSrc);
                SchemaFactory schf = SchemaFactory.lookup(schNS);
                Schema sch = schf.compileSchema(is);

                return sch.newValidator();
            } finally {
                getSourceResolver().release(schemaSrc);
            }
View Full Code Here

Examples of org.apache.cocoon.components.validation.SchemaFactory.compileSchema()

            Source schemaSrc = getSourceResolver().resolveURI(schDoc);

            try {
                InputSource is = SourceUtil.getInputSource(schemaSrc);
                SchemaFactory schf = SchemaFactory.lookup(schNS);
                Schema sch = schf.compileSchema(is);

                return sch.newValidator();
            } finally {
                getSourceResolver().release(schemaSrc);
            }
View Full Code Here

Examples of org.apache.cocoon.components.validation.SchemaFactory.compileSchema()

        }

        try {
            InputSource is = new InputSource(in);
            SchemaFactory schf = SchemaFactory.lookup(SchemaFactory.NAMESPACE_SCHEMATRON);
            Schema sch = schf.compileSchema(is);
            Validator validator = sch.newValidator();

            // set preprocessor parameters
            if (phase!=null) {
                validator.setProperty(Validator.PROPERTY_PHASE, phase);
View Full Code Here

Examples of org.apache.cocoon.components.validation.SchemaFactory.compileSchema()

            Source schemaSrc = getSourceResolver().resolveURI(schDoc);

            try {
                InputSource is = SourceUtil.getInputSource(schemaSrc);
                SchemaFactory schf = SchemaFactory.lookup(schNS);
                Schema sch = schf.compileSchema(is);

                return sch.newValidator();
            } finally {
                getSourceResolver().release(schemaSrc);
            }
View Full Code Here

Examples of org.apache.cocoon.validation.SchemaFactory.compileSchema()

      File file = new File( args[0] );
      if ( !file.exists () ) throw new Exception("Error: schema file not found !");
     InputStream istrm = new FileInputStream ( file );
     InputSource is = new InputSource ( istrm );
     SchemaFactory schf = SchemaFactory.lookup( SchemaFactory.NAMESPACE_SCHEMATRON );
     Schema sch = schf.compileSchema( is );
     Validator validator = sch.newValidator();

     // set preprocessor parameters
      if (args.length > 1)
         validator.setProperty("phase", new String(args[1]));
View Full Code Here

Examples of org.apache.cocoon.validation.SchemaFactory.compileSchema()

    File file = new File( fileLocation );
    if ( !file.exists () ) throw new RuntimeException("Error: schema file not found !");
   InputStream istrm = new FileInputStream ( file );
   InputSource is = new InputSource ( istrm );
   SchemaFactory schf = SchemaFactory.lookup ( SchemaFactory.NAMESPACE_SCHEMATRON );
   Schema sch = schf.compileSchema ( is );
   validator_ = sch.newValidator()
  }
 
 
  public Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String src, Parameters param) throws java.lang.Exception {
View Full Code Here

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