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() );