Examples of loadSchema()


Examples of com.thaiopensource.validate.ValidationDriver.loadSchema()

  boolean hadError = false;
  try {
      ValidationDriver driver = new ValidationDriver(properties.toPropertyMap(), sr);
      InputSource in = new InputSource(schema);
      if (driver.loadSchema(in)) {

    if (!driver.validate(ValidationDriver.uriOrFileInputSource(xmlFileName)))
        hadError = true;
      }
      else
View Full Code Here

Examples of com.thaiopensource.validate.ValidationDriver.loadSchema()

      ByteArrayOutputStream error = new ByteArrayOutputStream();
        ErrorHandlerImpl eh = new ErrorHandlerImpl(new BufferedWriter(new OutputStreamWriter(error)));
        ValidateProperty.ERROR_HANDLER.put(properties, eh);
        SchemaReader schemaReader = new AutoSchemaReader();
        ValidationDriver driver = new ValidationDriver(properties.toPropertyMap(), schemaReader);
        if (driver.loadSchema(in)) {
            if (driver.validate(ValidationDriver.uriOrFileInputSource(xml.getAbsolutePath()))) {
                System.out.println("" + error);
                return null;
            } else {
                return "" + error;
View Full Code Here

Examples of com.thaiopensource.validate.ValidationDriver.loadSchema()

      ByteArrayOutputStream error = new ByteArrayOutputStream();
        ErrorHandlerImpl eh = new ErrorHandlerImpl(new BufferedWriter(new OutputStreamWriter(error)));
        ValidateProperty.ERROR_HANDLER.put(properties, eh);
        SchemaReader schemaReader = new AutoSchemaReader();
        ValidationDriver driver = new ValidationDriver(properties.toPropertyMap(), schemaReader);
        if (driver.loadSchema(in)) {
            if (driver.validate(ValidationDriver.uriOrFileInputSource(xml.getAbsolutePath()))) {
                log.debug("" + error);
                return null;
            } else {
                log.error("" + error);
View Full Code Here

Examples of net.sf.saxon.Configuration.loadSchema()

                config.addSchemaSource(new StreamSource(new File(dir + "schema.xsd")),
                        config.getErrorListener());
                config.setConfigurationProperty(FeatureKeys.USE_TYPED_VALUE_CACHE, "false");
            }
            if (val) {
                config.loadSchema(new File(dir + "sa\\schema.xsd").toURI().toString());
                config.setSchemaValidationMode(Validation.STRICT);
            }

            Source streamSource = new StreamSource(file);
            long pstart = System.currentTimeMillis();
View Full Code Here

Examples of net.sf.saxon.Configuration.loadSchema()

                config.addSchemaSource(new StreamSource(new File(dir + "schema.xsd")),
                        config.getErrorListener());
                config.setConfigurationProperty(FeatureKeys.USE_TYPED_VALUE_CACHE, "false");
            }
            if (val) {
                config.loadSchema(new File(dir + "sa\\schema.xsd").toURI().toString());
                config.setSchemaValidationMode(Validation.STRICT);
            }

            Source streamSource = new StreamSource(file);
            long pstart = System.currentTimeMillis();
View Full Code Here

Examples of org.apache.camel.processor.validation.ValidatingProcessor.loadSchema()

        LOG.debug("{} using schema resource: {}", this, resourceUri);
        configureValidator(validator, uri, remaining, parameters);

        // force loading of schema at create time otherwise concurrent
        // processing could cause thread safe issues for the javax.xml.validation.SchemaFactory
        validator.loadSchema();
        // and make sure to close the input stream after the schema has been loaded
        IOHelper.close(is);

        return new ProcessorEndpoint(uri, this, validator);
    }
View Full Code Here

Examples of org.apache.camel.processor.validation.ValidatingProcessor.loadSchema()

        LOG.debug("{} using schema resource: {}", this, resourceUri);
        configureValidator(validator, uri, remaining, parameters);

        // force loading of schema at create time otherwise concurrent
        // processing could cause thread safe issues for the javax.xml.validation.SchemaFactory
        validator.loadSchema();

        return new ProcessorEndpoint(uri, this, validator);
    }

    protected void configureValidator(ValidatingProcessor validator, String uri, String remaining, Map<String, Object> parameters) throws Exception {
View Full Code Here

Examples of org.apache.camel.processor.validation.ValidatingProcessor.loadSchema()

        LOG.debug("{} using schema resource: {}", this, resourceUri);
        configureValidator(validator, uri, remaining, parameters);

        // force loading of schema at create time otherwise concurrent
        // processing could cause thread safe issues for the javax.xml.validation.SchemaFactory
        validator.loadSchema();

        return new ProcessorEndpoint(uri, this, validator);
    }

    protected void configureValidator(ValidatingProcessor validator, String uri, String remaining, Map<String, Object> parameters) throws Exception {
View Full Code Here

Examples of org.apache.camel.processor.validation.ValidatingProcessor.loadSchema()

        LOG.debug("{} using schema resource: {}", this, resourceUri);
        configureValidator(validator, uri, remaining, parameters);

        // force loading of schema at create time otherwise concurrent processing could
        // cause thread safe issues for the javax.xml.validation.SchemaFactory
        validator.loadSchema();

        return new ProcessorEndpoint(uri, this, validator);
    }

    protected void configureValidator(ValidatingProcessor validator, String uri, String remaining, Map<String, Object> parameters) throws Exception {
View Full Code Here

Examples of org.apache.camel.processor.validation.ValidatingProcessor.loadSchema()

        configureValidator(validator, uri, remaining, parameters);

        // force loading of schema at create time otherwise concurrent
        // processing could
        // cause thread safe issues for the javax.xml.validation.SchemaFactory
        validator.loadSchema();

        return new ProcessorEndpoint(uri, this, validator);
    }

    protected void configureValidator(ValidatingProcessor validator, String uri, String remaining, Map<String, Object> parameters) throws Exception {
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.