Package org.apache.xerces.dom3

Examples of org.apache.xerces.dom3.DOMError


        }
        // get DOM implementation
        DOMImplementationAS domImpl = (DOMImplementationAS)ASDOMImplementationImpl.getDOMImplementation();
        // create a new parser, and set the error handler
        DOMASBuilder parser = domImpl.createDOMASBuilder();
        DOMConfiguration config = parser.getConfig();
        config.setParameter("error-handler", new ASBuilder());

        boolean schemaFullChecking = DEFAULT_SCHEMA_FULL_CHECKING;

        String arg = null;
        int i = 0;

        // process -f/F
        arg = argv[i];
        if (arg.equals("-f")) {
            schemaFullChecking = true;
            arg = argv[++i];
        } else if (arg.equals("-F")) {
            schemaFullChecking = false;
            arg = argv[++i];
        }

        // set the features. since we only deal with schema, some features have
        // to be true
        config.setParameter(NAMESPACES_FEATURE_ID, Boolean.TRUE);
        config.setParameter(VALIDATION_FEATURE_ID, Boolean.TRUE);
       
        config.setParameter(SCHEMA_VALIDATION_FEATURE_ID, Boolean.TRUE);
        config.setParameter(SCHEMA_FULL_CHECKING_FEATURE_ID,
        (schemaFullChecking)?Boolean.TRUE:Boolean.FALSE);

        // process -a: as model files
        if (!arg.equals("-a")) {
            printUsage();
View Full Code Here


        }
        // get DOM implementation
        DOMImplementationAS domImpl = (DOMImplementationAS)ASDOMImplementationImpl.getDOMImplementation();
        // create a new parser, and set the error handler
        DOMASBuilder parser = domImpl.createDOMASBuilder();
        DOMConfiguration config = parser.getConfig();
        config.setParameter("error-handler", new ASBuilder());

        boolean schemaFullChecking = DEFAULT_SCHEMA_FULL_CHECKING;

        String arg = null;
        int i = 0;

        // process -f/F
        arg = argv[i];
        if (arg.equals("-f")) {
            schemaFullChecking = true;
            arg = argv[++i];
        } else if (arg.equals("-F")) {
            schemaFullChecking = false;
            arg = argv[++i];
        }

        // set the features. since we only deal with schema, some features have
        // to be true
        config.setParameter(NAMESPACES_FEATURE_ID, Boolean.TRUE);
        config.setParameter(VALIDATION_FEATURE_ID, Boolean.TRUE);
       
        config.setParameter(SCHEMA_VALIDATION_FEATURE_ID, Boolean.TRUE);
        config.setParameter(SCHEMA_FULL_CHECKING_FEATURE_ID,
        (schemaFullChecking)?Boolean.TRUE:Boolean.FALSE);

        // process -a: as model files
        if (!arg.equals("-a")) {
            printUsage();
View Full Code Here

            XSImplementation impl = (XSImplementation) registry.getDOMImplementation("XS-Loader");

            XSLoader schemaLoader = impl.createXSLoader(null);

            DOMConfiguration config = schemaLoader.getConfig();

            // create Error Handler
            DOMErrorHandler errorHandler = new QueryXS();

            // set error handler
            config.setParameter("error-handler", errorHandler);

            // set validation feature
            config.setParameter("validate", Boolean.TRUE);

            // parse document
            System.out.println("Parsing " + argv[0] + "...");
            XSModel model = schemaLoader.loadURI(argv[0]);
            if (model != null) {
View Full Code Here

        }
        // get DOM implementation
        DOMImplementationAS domImpl = (DOMImplementationAS)ASDOMImplementationImpl.getDOMImplementation();
        // create a new parser, and set the error handler
        DOMASBuilder parser = domImpl.createDOMASBuilder();
        DOMConfiguration config = parser.getDomConfig();
        config.setParameter("error-handler", new ASBuilder());

        boolean schemaFullChecking = DEFAULT_SCHEMA_FULL_CHECKING;

        String arg = null;
        int i = 0;

        // process -f/F
        arg = argv[i];
        if (arg.equals("-f")) {
            schemaFullChecking = true;
            arg = argv[++i];
        } else if (arg.equals("-F")) {
            schemaFullChecking = false;
            arg = argv[++i];
        }

        // set the features. since we only deal with schema, some features have
        // to be true
        config.setParameter(NAMESPACES_FEATURE_ID, Boolean.TRUE);
        config.setParameter(VALIDATION_FEATURE_ID, Boolean.TRUE);
       
        config.setParameter(SCHEMA_VALIDATION_FEATURE_ID, Boolean.TRUE);
        config.setParameter(SCHEMA_FULL_CHECKING_FEATURE_ID,
        (schemaFullChecking)?Boolean.TRUE:Boolean.FALSE);

        // process -a: as model files
        if (!arg.equals("-a")) {
            printUsage();
View Full Code Here

    *                      parsing the document.
    */

   public void warning(String domain, String key,
      XMLParseException exception) throws XNIException {
  DOMError error = new DOMErrorImpl(DOMError.SEVERITY_WARNING, exception);
  fDomErrorHandler.handleError(error);
   } // warning(String,String,XMLParseException)
View Full Code Here

    * @throws XNIException Thrown to signal that the parser should stop
    *                      parsing the document.
    */
   public void error(String domain, String key,
      XMLParseException exception) throws XNIException {
  DOMError error = new DOMErrorImpl(DOMError.SEVERITY_ERROR, exception);
  fDomErrorHandler.handleError(error);                       
   } // error(String,String,XMLParseException)
View Full Code Here

    * @throws XNIException Thrown to signal that the parser should stop
    *                      parsing the document.
    */
   public void fatalError(String domain, String key,
      XMLParseException exception) throws XNIException {
  DOMError error = new DOMErrorImpl(DOMError.SEVERITY_FATAL_ERROR, exception);
  fDomErrorHandler.handleError(error);                            
   } // fatalError(String,String,XMLParseException)
View Full Code Here

    *                      parsing the document.
    */

   public void warning(String domain, String key,
      XMLParseException exception) throws XNIException {
  DOMError error = new DOMErrorImpl(DOMError.SEVERITY_WARNING, exception);
  fDomErrorHandler.handleError(error);
   } // warning(String,String,XMLParseException)
View Full Code Here

    * @throws XNIException Thrown to signal that the parser should stop
    *                      parsing the document.
    */
   public void error(String domain, String key,
      XMLParseException exception) throws XNIException {
  DOMError error = new DOMErrorImpl(DOMError.SEVERITY_ERROR, exception);
  fDomErrorHandler.handleError(error);                       
   } // error(String,String,XMLParseException)
View Full Code Here

    * @throws XNIException Thrown to signal that the parser should stop
    *                      parsing the document.
    */
   public void fatalError(String domain, String key,
      XMLParseException exception) throws XNIException {
  DOMError error = new DOMErrorImpl(DOMError.SEVERITY_FATAL_ERROR, exception);
  fDomErrorHandler.handleError(error);                            
   } // fatalError(String,String,XMLParseException)
View Full Code Here

TOP

Related Classes of org.apache.xerces.dom3.DOMError

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.