Examples of asGrammar()


Examples of batch.model.ISchema.asGrammar()

      }
       
      // set the grammar
      ISchema schema = validator.parseSchema(schemaFile);
      assertNotNull( "failed to parse the schema", schema );
      driver.grammar = schema.asGrammar();
      driver.outputName = "NUL";
       
      // run the test
      assertEquals( "generator for "+schemaFile.getName(), driver.run(System.out), 0 );
       
View Full Code Here

Examples of batch.model.ISchema.asGrammar()

            GrammarWriter writer = getWriter();

            // serialize it into the XML representation
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            writer.setDocumentHandler(new XMLSerializer(baos, new OutputFormat("xml", null, true)));
            writer.write(source.asGrammar());

            // then parse it again
            schema = secondValidator.parseSchema(new ByteArrayInputStream(baos.toByteArray()));
            if (schema == null)
                fail("conversion failed"); // unexpected result
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.