Package com.sun.msv.verifier.regexp

Examples of com.sun.msv.verifier.regexp.REDocumentDeclaration


                            Locator locator ) {
       
        // create a VerifierFilter and configure it
        // so that error messages will be sent to the core,
        Verifier v = new Verifier(
            new REDocumentDeclaration(grammar),
            new ErrorHandlerAdaptor(_core,locator) );
        v.setPanicMode( true );

        return new ValidatingUnmarshaller(
            new VerifierFilter( v ), _core );
View Full Code Here


public class Unmarshaller extends TypeDetector {
 
  private final Binder binder;
 
  public Unmarshaller( BindableGrammar grammar ) {
    super( new REDocumentDeclaration(grammar),
      new ErrorHandler(){
        // throw an exception if any error happens.
        public void warning( SAXParseException e ) {}
        public void fatalError( SAXParseException e ) throws UnmarshallingException {
          throw new UnmarshallingException(e);
View Full Code Here

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

    /**
     * Creates a new instance of Verifier that will be used to validate
     * a document.
     */
    protected IVerifier getVerifier( Grammar grammar ) {
        return new Verifier( new REDocumentDeclaration(grammar),
            new WordlessErrorReporter() );
    }
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

    private final RelmesVerifier verifier;
   
    public RelamesVerifierImpl(Grammar grammar) throws VerifierConfigurationException {
        try {
            this.verifier = new RelmesVerifier(new REDocumentDeclaration(grammar),null);
        } catch( ParserConfigurationException e ) {
            throw new VerifierConfigurationException(e);
        }
    }
View Full Code Here

        if( grammar==null ) {
            System.err.println("failed to load a grammar");
            return;
        }
       
        filter = new VerifierFilter( new REDocumentDeclaration(grammar),
            new com.sun.msv.driver.textui.ReportErrorHandler() );
       
        filter.setParent(factory.newSAXParser().getXMLReader());
        filter.setContentHandler(this);
        filter.parse( args[2] );
View Full Code Here

                            Locator locator ) {
       
        // create a VerifierFilter and configure it
        // so that error messages will be sent to the core,
        Verifier v = new Verifier(
            new REDocumentDeclaration(grammar),
            new ErrorHandlerAdaptor(_core,locator) );
        v.setPanicMode( true );

        return new ValidatingUnmarshaller(
            new VerifierFilter( v ), _core );
View Full Code Here

        if( grammar instanceof XMLSchemaGrammar )
            // use verifier+identity constraint checker.
            verifier = new XMLSchemaVerifier( (XMLSchemaGrammar)grammar );
        else
            // validate normally by using Verifier.
            verifier = new SimpleVerifier( new REDocumentDeclaration(grammar) );
       
       
        boolean allValid = true;
       
        for( int i=0; i<fileNames.size(); i++ )    {
View Full Code Here

            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.regexp.REDocumentDeclaration

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.