Package com.sun.msv.verifier.util

Examples of com.sun.msv.verifier.util.ErrorHandlerImpl


               
                XMLReader r = factory.newSAXParser().getXMLReader();
                Verifier v = new Verifier(
                    new REDocumentDeclaration(grammar),
//                    new REDocumentDeclaration(grammar.getTopLevel(),localPool),
                    new ErrorHandlerImpl() );
                r.setContentHandler(v);
                try
                {
                    r.parse(fileName);
                    if(!v.isValid()) throw new Error();
View Full Code Here


     */
    static IVerifier createVerifier( Grammar g ) {
        if( g instanceof XMLSchemaGrammar )
            return new IDConstraintChecker(
                (XMLSchemaGrammar)g,
                new ErrorHandlerImpl() );
        else
            return new com.sun.msv.verifier.Verifier(
                new REDocumentDeclaration(g),
                new ErrorHandlerImpl() );
    }
View Full Code Here

        // check the validity of generated document.
        DOM2toSAX2 d2s = new DOM2toSAX2();
        Verifier v = new Verifier(
          new REDocumentDeclaration(grammar),
          debug?
            (ErrorHandler)new ErrorHandlerImpl():
            (ErrorHandler)new IgnoreErrorHandler() );
        d2s.setContentHandler(v);
        d2s.traverse(dom);
       
        if( createError && !v.isValid() )  break;
View Full Code Here

   
    public PSVIRecorder( Grammar grammar, XalanNodeAssociationManager _manager ) {
        verifier = new TypeDetector(
            new REDocumentDeclaration(grammar),
            this,
            new ErrorHandlerImpl() );
        this.manager = _manager;
    }
View Full Code Here

        SAXParserFactory factory = SAXParserFactory.newInstance();
        factory.setNamespaceAware(true);
        XMLReader reader = factory.newSAXParser().getXMLReader();
       
        // create an instance of verifier,
        TypeDetector verifier = new TypeDetector(grammar, new ErrorHandlerImpl() );
       
        // configure a pipeline so that the verifier will receive SAX events first.
        reader.setContentHandler(verifier);
       
        // then set your application handler to verifier.
View Full Code Here

     */
    static IVerifier createVerifier( Grammar g ) {
        if( g instanceof XMLSchemaGrammar )
            return new IDConstraintChecker(
                (XMLSchemaGrammar)g,
                new ErrorHandlerImpl() );
        else
            return new com.sun.msv.verifier.Verifier(
                new REDocumentDeclaration(g),
                new ErrorHandlerImpl() );
    }
View Full Code Here

TOP

Related Classes of com.sun.msv.verifier.util.ErrorHandlerImpl

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.