Package com.sun.msv.driver.textui

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


    public static void doMain( String[] args ) throws Exception {
                System.out.println("parsing    "+args[0]);
                // parse a grammar
                SAXParserFactory factory = SAXParserFactory.newInstance();
                factory.setNamespaceAware(true);
                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() );
View Full Code Here


        try {
            SAXParserFactory factory = SAXParserFactory.newInstance();
            factory.setNamespaceAware(true);
            Grammar grammar = SRELAXNGReader.parse(
                    new InputSource(grammarUrl.openStream()),
                    factory, new DebugController(false, false));
            if (grammar == null)
                throw new RuntimeException(
                        "Unexpected failure parsing grammar URL '"
                        + grammarUrl + "'");
   
View Full Code Here

        if( args[0].equals("relax") )    schemaName = args[1]+".rlx";
        else                            schemaName = args[1]+".trex";

        grammar = GrammarLoader.loadSchema(
                schemaName,
                new DebugController(false,false),
                factory );
       
       
        for( int i=100; i<=999; i++ )
            jobs.push( args[1]+".v"+i+args[2] );
View Full Code Here

   
            try {
          if(dtdAsSchema) {
            grammar = DTDReader.parse(
              is,
              new DebugController(warning,quiet),
              new ExpressionPool());
          } else {
            grammar = GrammarLoader.loadSchema(
              is,
              new DebugController(warning,quiet),
              factory);
          }
            } catch( IOException e ) {
                throw new CommandLineException("unable to parse "+grammarName+" :"+e.getMessage());
            } catch( SAXException e ) {
View Full Code Here

           
            // parse the grammar
            SAXParserFactory spf = SAXParserFactory.newInstance();
            spf.setNamespaceAware(true);
            GrammarReader reader = new SchmitRELAXNGReader(
                new DebugController(false),
                spf,
                new ExpressionPool() );
           
            reader.parse(href);
            Grammar grammar = reader.getResultAsGrammar();
View Full Code Here

    /**
     * Creates an instance of GrammarReaderController that is used to
     * parse a schema.
     */
    protected GrammarReaderController createController() {
        return new DebugController(true,false,resolver);
    }
View Full Code Here

   
    System.out.println("parsing    "+args[0]);
    // parse a grammar
    SAXParserFactory factory = javax.xml.parsers.SAXParserFactory.newInstance();
    factory.setNamespaceAware(true);
    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() );
View Full Code Here

    factory.setNamespaceAware(true);
   
    // load a grammar.
    Grammar g = GrammarLoader.loadSchema(
      args[0],
      new DebugController( false,false, System.err ),
      factory );
   
    if( g==null ) {
      System.err.println(localize(MSG_GRAMMAR_ERROR));
      return;
View Full Code Here

            return;
        }
       
        // load a schema. GrammarLoader will detect the schema language automatically.
        GrammarLoader loader = new GrammarLoader();
        loader.setController( new DebugController(false,false) );
        DocumentDeclaration grammar = GrammarLoader.loadVGM( args[0] );
       
        if( grammar==null ) {
            System.err.println("failed to load a grammar");
            return;
View Full Code Here

        SAXParserFactory factory = SAXParserFactory.newInstance();
        factory.setNamespaceAware(true);

        // load a grammar.
        Grammar g = GrammarLoader.loadSchema(args[0], new DebugController(false, false, System.err), factory);

        if (g == null) {
            System.err.println(localize(MSG_GRAMMAR_ERROR));
            return;
        }
View Full Code Here

TOP

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

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.