/* this file is generated by RelaxNGCC */ import org.xml.sax.SAXException; import org.xml.sax.XMLReader; import org.xml.sax.Attributes; import javax.xml.parsers.SAXParserFactory; import org.xml.sax.XMLReader; class sample1 extends NGCCHandler { private int _ngcc_current_state; private String name; private String number; public sample1(NGCCHandler parent, NGCCRuntime _runtime, int cookie ) { super(parent,cookie); this.runtime = _runtime; _ngcc_current_state=10; } public sample1( NGCCRuntime _runtime ) { this(null,_runtime,-1); } protected final NGCCRuntime runtime; public final NGCCRuntime getRuntime() { return runtime; } void action0() throws SAXException { System.out.println(name); } void action1() throws SAXException { System.out.println(number); } public static void main( String[] args ) throws Exception { SAXParserFactory factory = SAXParserFactory.newInstance(); factory.setNamespaceAware(true); XMLReader reader = factory.newSAXParser().getXMLReader(); NGCCRuntime runtime = new NGCCRuntime(); reader.setContentHandler(runtime); for( int i=0; i=0) { runtime.consumeAttribute(ai); } } } /* ------------ child completed ------------ */ public void onChildCompleted(Object result, int cookie,boolean needAttCheck) throws SAXException { switch(cookie) { default: throw new InternalError(); } } }