Package com.sun.msv.driver.textui

Examples of com.sun.msv.driver.textui.ReportErrorHandler


                Grammar grammar = SRELAXNGReader.parse( args[0], factory, new DebugController(false,false) );
                if(grammar==null)       return;
               
                // setup verifier
                RelmesVerifier verifier = new RelmesVerifier(
                        new REDocumentDeclaration(grammar), new ReportErrorHandler() );
                XMLReader reader = factory.newSAXParser().getXMLReader();
                reader.setContentHandler(verifier);
               
                try {
                for( int i=1; i<args.length; i++ ) {
View Full Code Here


            CatalogResolver catalogResolver = new CatalogResolver();
   
            for (int i = 0; i < sourceUrls.length; i++ ) {
                verifier = new RelmesVerifier(
                        new REDocumentDeclaration(grammar),
                        new ReportErrorHandler());
                reader = factory.newSAXParser().getXMLReader();
                reader.setEntityResolver(catalogResolver);
                reader.setContentHandler(verifier);
                if (verbose)
                    System.out.print("Validating " + sourceUrls[i] + "...  ");
View Full Code Here

            Schema schema = getSchemaForSchema();
            final boolean[] error = new boolean[1];
           
            // set up a pipe line so that the file will be validated by s4s
            VerifierFilter filter = schema.newVerifier().getVerifierFilter();
            filter.setErrorHandler( new ReportErrorHandler() {
                public void error( SAXParseException e ) throws SAXException {
                    super.error(e);
                    error[0]=true;
                }
                public void fatalError( SAXParseException e ) throws SAXException {
View Full Code Here

     * <p>
     * override this method to use a different verifier implementation.
     */
    protected IVerifier getVerifier( Grammar grammar ) {
        return new Verifier( new REDocumentDeclaration(grammar),
            new ReportErrorHandler() );
    }
View Full Code Here

        return new XMLSchemaReader( createController(), factory, new ExpressionPool() );
    }
   
    protected IVerifier getVerifier( Grammar grammar ) {
        return new IDConstraintChecker( (XMLSchemaGrammar)grammar,
            new ReportErrorHandler() );
    }
View Full Code Here

    Grammar grammar = SRELAXNGReader.parse( args[0], factory, new DebugController(false,false) );
    if(grammar==nullreturn;
   
    // setup verifier
    RelmesVerifier verifier = new RelmesVerifier(
      new REDocumentDeclaration(grammar), new ReportErrorHandler() );
    XMLReader reader = factory.newSAXParser().getXMLReader();
    reader.setContentHandler(verifier);
   
    try {
    for( int i=1; i<args.length; i++ ) {
View Full Code Here

        // other overloaded methods allows you to parse a schema from InputSource, URL, etc.
        Verifier verifier = factory.newVerifier(new File(args[0]));
       
        // set the error handler. This object receives validation errors.
        // you can pass any class that implements org.sax.ErrorHandler.
        verifier.setErrorHandler( new ReportErrorHandler() );
       
        // use the verify method to validate documents.
        // or you can validate SAX events by using the getVerifierHandler method.
        for( int i=1; i<args.length; i++ )
            if(verifier.verify(args[i]))
View Full Code Here

TOP

Related Classes of com.sun.msv.driver.textui.ReportErrorHandler

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.