Package com.thaiopensource.validate

Examples of com.thaiopensource.validate.ValidationDriver


  // Oasis Open Document nrg.
  properties.put(RngProperty.CHECK_ID_IDREF, null);

  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
    hadError = true;
  }
View Full Code Here


        PropertyMapBuilder properties = new PropertyMapBuilder();
      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

        PropertyMapBuilder properties = new PropertyMapBuilder();
      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);
                return "" + error;
View Full Code Here

TOP

Related Classes of com.thaiopensource.validate.ValidationDriver

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.