/* this file is generated by RelaxNGCC */
package relaxngcc.parser.state;
import org.xml.sax.SAXException;
import org.xml.sax.Attributes;
import relaxngcc.parser.ParserRuntime;

    import relaxngcc.grammar.*;
    import relaxngcc.datatype.Datatype;
    import org.xml.sax.Locator;
  


class PatternState extends NGCCHandler {
    private String typeName;
    private NameClass name;
    private String alias;
    private String value;
    private String target;
    private Pattern p;
    private NGCCCallParam params;
    private Pattern child;
    protected final ParserRuntime $runtime;
    private int $_ngcc_current_state;
    protected String $uri;
    protected String $localName;
    protected String $qname;

    public final NGCCRuntime getRuntime() {
        return($runtime);
    }

    public PatternState(NGCCHandler parent, NGCCEventSource source, ParserRuntime runtime, int cookie) {
        super(source, parent, cookie);
        $runtime = runtime;
        $_ngcc_current_state = 116;
    }

    public PatternState(ParserRuntime runtime) {
        this(null, runtime, runtime, -1);
    }

    private void action0()throws SAXException {
         p = new JavaBlock($runtime, value); 
}

    private void action1()throws SAXException {
        
          // behave as if there is an implicit ref
          // between <grammar> and its  parent.
          p = new RefPattern($runtime, loc, $runtime.grammar, new NGCCCallParam($runtime, null, null) );
          // get back to the parent context
          $runtime.grammar = $runtime.grammar.parent;
        
}

    private void action2()throws SAXException {
        
          $runtime.grammar = new Grammar( $runtime );
        
}

    private void action3()throws SAXException {
        
          p = new NotAllowedPattern($runtime);
        
}

    private void action4()throws SAXException {
        
          p = new DataPattern($runtime, loc, $runtime.getDatatype(typeName),alias);
        
}

    private void action5()throws SAXException {
        
          p = new ValuePattern($runtime, loc,Datatype.NOOP, value, alias);
        
}

    private void action6()throws SAXException {
        
          p = new DataPattern($runtime, loc, Datatype.NOOP, alias);
        
}

    private void action7()throws SAXException {
        
          p = new EmptyPattern($runtime);
        
}

    private void action8()throws SAXException {
        
          // refers to the parent grammar,
          // instead of the current grammar
          p = new RefPattern($runtime, loc,
              $runtime.grammar.parent.getOrCreate($runtime, target),params);
        
}

    private void action9()throws SAXException {
        
            p = new RefPattern($runtime, loc, $runtime.grammar.getOrCreate($runtime, target), params);
          
}

    private void action10()throws SAXException {
        
          p = new InterleavePattern($runtime, new DataPattern($runtime, loc, Datatype.NOOP, null ), p );
        
}

    private void action11()throws SAXException {
        
          p = new ListPattern($runtime, loc, p, alias);
        
}

    private void action12()throws SAXException {
        
          p = new OneOrMorePattern($runtime, p);
        
}

    private void action13()throws SAXException {
        
          p = new ChoicePattern($runtime, new OneOrMorePattern($runtime, p), new EmptyPattern($runtime));
        
}

    private void action14()throws SAXException {
        
          p = new ChoicePattern($runtime, p, new EmptyPattern($runtime));
        
}

    private void action15()throws SAXException {
        
            if(p==null)  p = child;
            else         p = new ChoicePattern($runtime, p, child);
          
}

    private void action16()throws SAXException {
        
            if(p==null)  p = child;
            else         p = new InterleavePattern($runtime, p, child);
          
}

    private void action17()throws SAXException {
        
          // if there is no child pattern, assume <text>.
          if(p==null)
            p = new DataPattern($runtime, loc, Datatype.NOOP, alias);
            p = new AttributePattern($runtime, loc, name, p);
        
}

    private void action18()throws SAXException {
        p = new ElementPattern($runtime, loc, name, p);
}

    private void action19()throws SAXException {
        
      loc = $runtime.createLocator();
    
}

    public void enterElement(String $__uri, String $__local, String $__qname, Attributes $attrs) throws SAXException {
        int $ai;
        $uri = $__uri;
        $localName = $__local;
        $qname = $__qname;
        switch($_ngcc_current_state) {
        case 84:
            {
                if(($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","class"))>=0) {
                    NGCCHandler h = new NGCCLocalClass(this, super._source, $runtime, 166, p,loc);
                    spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
                }
                else {
                    unexpectedEnterElement($__qname);
                }
            }
            break;
        case 94:
            {
                if((($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("optional")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("list")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("notAllowed")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("ref")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("interleave")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("attribute")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("text")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("mixed")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("oneOrMore")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("choice")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("empty")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("data")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("parentRef")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("element")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("group")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("value")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("zeroOrMore")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("grammar")) || ($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("java"))))))))))))))))))))) {
                    NGCCHandler h = new PatternState(this, super._source, $runtime, 179);
                    spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
                }
                else {
                    if(($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","class"))>=0) {
                        NGCCHandler h = new NGCCLocalClass(this, super._source, $runtime, 177, p,loc);
                        spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
                    }
                    else {
                        unexpectedEnterElement($__qname);
                    }
                }
            }
            break;
        case 95:
            {
                if((($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("optional")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("list")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("notAllowed")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("ref")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("interleave")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("attribute")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("text")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("mixed")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("oneOrMore")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("choice")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("empty")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("data")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("parentRef")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("element")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("group")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("value")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("zeroOrMore")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("grammar")) || ($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("java"))))))))))))))))))))) {
                    NGCCHandler h = new PatternState(this, super._source, $runtime, 178);
                    spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
                }
                else {
                    unexpectedEnterElement($__qname);
                }
            }
            break;
        case 90:
            {
                if((($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("optional")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("list")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("notAllowed")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("ref")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("interleave")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("attribute")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("text")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("mixed")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("oneOrMore")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("choice")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("empty")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("data")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("parentRef")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("element")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("group")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("value")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("zeroOrMore")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("grammar")) || ($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("java"))))))))))))))))))))) {
                    NGCCHandler h = new PatternState(this, super._source, $runtime, 172);
                    spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
                }
                else {
                    unexpectedEnterElement($__qname);
                }
            }
            break;
        case 114:
            {
                if((($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("choice")) || ((($ai = $runtime.getAttributeIndex("","name"))>=0 && ((((((((((((((((((($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("java")) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("grammar"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("zeroOrMore"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("value"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("group"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("element"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("parentRef"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("data"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("empty"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("choice"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("oneOrMore"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("mixed"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("text"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("attribute"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("interleave"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("ref"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("notAllowed"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("list"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("optional")))) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("anyName")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("name")) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("nsName"))))))) {
                    NGCCHandler h = new name(this, super._source, $runtime, 200, false);
                    spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
                }
                else {
                    unexpectedEnterElement($__qname);
                }
            }
            break;
        case 21:
            {
                if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
                    $runtime.consumeAttribute($ai);
                    $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
                }
                else {
                    unexpectedEnterElement($__qname);
                }
            }
            break;
        case 31:
            {
                if(($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","alias"))>=0) {
                    NGCCHandler h = new NGCCalias(this, super._source, $runtime, 112);
                    spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
                }
                else {
                    unexpectedEnterElement($__qname);
                }
            }
            break;
        case 109:
            {
                if((($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("choice")) || ((($ai = $runtime.getAttributeIndex("","name"))>=0 && ((((((((((((((((((($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("java")) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("grammar"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("zeroOrMore"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("value"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("group"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("element"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("parentRef"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("data"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("empty"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("choice"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("oneOrMore"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("mixed"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("text"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("attribute"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("interleave"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("ref"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("notAllowed"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("list"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("optional")))) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("anyName")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("name")) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("nsName"))))))) {
                    NGCCHandler h = new name(this, super._source, $runtime, 194, true);
                    spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
                }
                else {
                    unexpectedEnterElement($__qname);
                }
            }
            break;
        case 113:
            {
                if((($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("optional")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("list")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("notAllowed")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("interleave")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("ref")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("text")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("attribute")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("mixed")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("oneOrMore")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("choice")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("empty")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("data")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("parentRef")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("element")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("group")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("value")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("zeroOrMore")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("grammar")) || ($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("java"))))))))))))))))))))) {
                    NGCCHandler h = new patterns(this, super._source, $runtime, 199);
                    spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
                }
                else {
                    unexpectedEnterElement($__qname);
                }
            }
            break;
        case 104:
            {
                if(($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","class"))>=0) {
                    NGCCHandler h = new NGCCLocalClass(this, super._source, $runtime, 188, p,loc);
                    spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
                }
                else {
                    unexpectedEnterElement($__qname);
                }
            }
            break;
        case 32:
            {
                if(($ai = $runtime.getAttributeIndex("","type"))>=0) {
                    $runtime.consumeAttribute($ai);
                    $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
                }
                else {
                    $_ngcc_current_state = 31;
                    $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
                }
            }
            break;
        case 80:
            {
                if((($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("optional")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("list")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("notAllowed")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("interleave")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("ref")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("text")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("attribute")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("mixed")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("oneOrMore")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("choice")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("empty")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("data")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("parentRef")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("element")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("group")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("value")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("zeroOrMore")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("grammar")) || ($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("java"))))))))))))))))))))) {
                    NGCCHandler h = new patterns(this, super._source, $runtime, 162);
                    spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
                }
                else {
                    unexpectedEnterElement($__qname);
                }
            }
            break;
        case 14:
            {
                if(($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","class"))>=0) {
                    NGCCHandler h = new NGCCLocalClass(this, super._source, $runtime, 93, p,loc);
                    spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
                }
                else {
                    unexpectedEnterElement($__qname);
                }
            }
            break;
        case 70:
            {
                if((($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("optional")) || ((($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","alias"))>=0 && ((((((((((((((((((($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("java")) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("grammar"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("zeroOrMore"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("value"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("group"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("element"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("parentRef"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("data"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("empty"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("choice"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("oneOrMore"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("mixed"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("text"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("attribute"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("interleave"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("ref"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("notAllowed"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("list"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("optional")))) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("list")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("notAllowed")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("interleave")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("ref")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("text")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("attribute")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("mixed")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("oneOrMore")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("choice")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("empty")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("data")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("parentRef")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("element")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("group")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("value")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("zeroOrMore")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("grammar")) || ($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("java")))))))))))))))))))))) {
                    NGCCHandler h = new NGCCalias(this, super._source, $runtime, 152);
                    spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
                }
                else {
                    unexpectedEnterElement($__qname);
                }
            }
            break;
        case 39:
            {
                if(($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","class"))>=0) {
                    NGCCHandler h = new NGCCLocalClass(this, super._source, $runtime, 121, p,loc);
                    spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
                }
                else {
                    unexpectedEnterElement($__qname);
                }
            }
            break;
        case 40:
            {
                if((($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","alias"))>=0 || ($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","class"))>=0)) {
                    NGCCHandler h = new NGCCalias(this, super._source, $runtime, 122);
                    spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
                }
                else {
                    unexpectedEnterElement($__qname);
                }
            }
            break;
        case 44:
            {
                if(($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","class"))>=0) {
                    NGCCHandler h = new NGCCLocalClass(this, super._source, $runtime, 126, p,loc);
                    spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
                }
                else {
                    unexpectedEnterElement($__qname);
                }
            }
            break;
        case 54:
            {
                if(($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("withParams"))) {
                    NGCCHandler h = new NGCCwithParams(this, super._source, $runtime, 136, params);
                    spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
                }
                else {
                    NGCCHandler h = new NGCCwithParams(this, super._source, $runtime, 136, params);
                    spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
                }
            }
            break;
        case 89:
            {
                if((($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("optional")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("list")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("notAllowed")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("ref")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("interleave")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("attribute")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("text")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("mixed")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("oneOrMore")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("choice")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("empty")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("data")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("parentRef")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("element")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("group")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("value")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("zeroOrMore")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("grammar")) || ($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("java"))))))))))))))))))))) {
                    NGCCHandler h = new PatternState(this, super._source, $runtime, 173);
                    spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
                }
                else {
                    if(($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","class"))>=0) {
                        NGCCHandler h = new NGCCLocalClass(this, super._source, $runtime, 171, p,loc);
                        spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
                    }
                    else {
                        unexpectedEnterElement($__qname);
                    }
                }
            }
            break;
        case 69:
            {
                if((($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("optional")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("list")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("notAllowed")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("interleave")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("ref")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("text")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("attribute")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("mixed")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("oneOrMore")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("choice")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("empty")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("data")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("parentRef")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("element")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("group")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("value")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("zeroOrMore")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("grammar")) || ($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("java"))))))))))))))))))))) {
                    NGCCHandler h = new patterns(this, super._source, $runtime, 151);
                    spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
                }
                else {
                    unexpectedEnterElement($__qname);
                }
            }
            break;
        case 29:
            {
                if(($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","class"))>=0) {
                    NGCCHandler h = new NGCCLocalClass(this, super._source, $runtime, 110, p,loc);
                    spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
                }
                else {
                    unexpectedEnterElement($__qname);
                }
            }
            break;
        case 116:
            {
                if(($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("element"))) {
                    $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
                    action19();
                    $_ngcc_current_state = 114;
                }
                else {
                    if(($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("attribute"))) {
                        $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
                        action19();
                        $_ngcc_current_state = 109;
                    }
                    else {
                        if(($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("group"))) {
                            $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
                            action19();
                            $_ngcc_current_state = 100;
                        }
                        else {
                            if(($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("interleave"))) {
                                $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
                                action19();
                                $_ngcc_current_state = 95;
                            }
                            else {
                                if(($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("choice"))) {
                                    $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
                                    action19();
                                    $_ngcc_current_state = 90;
                                }
                                else {
                                    if(($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("optional"))) {
                                        $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
                                        action19();
                                        $_ngcc_current_state = 85;
                                    }
                                    else {
                                        if(($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("zeroOrMore"))) {
                                            $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
                                            action19();
                                            $_ngcc_current_state = 80;
                                        }
                                        else {
                                            if(($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("oneOrMore"))) {
                                                $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
                                                action19();
                                                $_ngcc_current_state = 75;
                                            }
                                            else {
                                                if(($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("list"))) {
                                                    $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
                                                    action19();
                                                    $_ngcc_current_state = 70;
                                                }
                                                else {
                                                    if(($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("mixed"))) {
                                                        $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
                                                        action19();
                                                        $_ngcc_current_state = 64;
                                                    }
                                                    else {
                                                        if(($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("ref"))) {
                                                            $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
                                                            action19();
                                                            $_ngcc_current_state = 59;
                                                        }
                                                        else {
                                                            if(($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("parentRef"))) {
                                                                $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
                                                                action19();
                                                                $_ngcc_current_state = 51;
                                                            }
                                                            else {
                                                                if(($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("empty"))) {
                                                                    $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
                                                                    action19();
                                                                    action7();
                                                                    $_ngcc_current_state = 44;
                                                                }
                                                                else {
                                                                    if(($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("text"))) {
                                                                        $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
                                                                        action19();
                                                                        $_ngcc_current_state = 40;
                                                                    }
                                                                    else {
                                                                        if(($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("value"))) {
                                                                            $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
                                                                            action19();
                                                                            $_ngcc_current_state = 32;
                                                                        }
                                                                        else {
                                                                            if(($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("data"))) {
                                                                                $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
                                                                                action19();
                                                                                $_ngcc_current_state = 25;
                                                                            }
                                                                            else {
                                                                                if(($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("notAllowed"))) {
                                                                                    $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
                                                                                    action19();
                                                                                    action3();
                                                                                    $_ngcc_current_state = 10;
                                                                                }
                                                                                else {
                                                                                    if(($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("grammar"))) {
                                                                                        $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
                                                                                        action19();
                                                                                        action2();
                                                                                        $_ngcc_current_state = 7;
                                                                                    }
                                                                                    else {
                                                                                        if(($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("java"))) {
                                                                                            $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
                                                                                            action19();
                                                                                            $_ngcc_current_state = 3;
                                                                                        }
                                                                                        else {
                                                                                            unexpectedEnterElement($__qname);
                                                                                        }
                                                                                    }
                                                                                }
                                                                            }
                                                                        }
                                                                    }
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
            break;
        case 112:
            {
                if(($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","class"))>=0) {
                    NGCCHandler h = new NGCCLocalClass(this, super._source, $runtime, 198, p,loc);
                    spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
                }
                else {
                    unexpectedEnterElement($__qname);
                }
            }
            break;
        case 58:
            {
                if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
                    $runtime.consumeAttribute($ai);
                    $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
                }
                else {
                    unexpectedEnterElement($__qname);
                }
            }
            break;
        case 79:
            {
                if(($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","class"))>=0) {
                    NGCCHandler h = new NGCCLocalClass(this, super._source, $runtime, 161, p,loc);
                    spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
                }
                else {
                    unexpectedEnterElement($__qname);
                }
            }
            break;
        case 7:
            {
                if((($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("java-import")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("define")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("include")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("start")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("div")) || ($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("java-body")))))))) {
                    NGCCHandler h = new GrammarContent(this, super._source, $runtime, 86);
                    spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
                }
                else {
                    unexpectedEnterElement($__qname);
                }
            }
            break;
        case 85:
            {
                if((($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("optional")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("list")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("notAllowed")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("interleave")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("ref")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("text")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("attribute")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("mixed")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("oneOrMore")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("choice")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("empty")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("data")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("parentRef")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("element")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("group")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("value")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("zeroOrMore")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("grammar")) || ($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("java"))))))))))))))))))))) {
                    NGCCHandler h = new patterns(this, super._source, $runtime, 167);
                    spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
                }
                else {
                    unexpectedEnterElement($__qname);
                }
            }
            break;
        case 15:
            {
                if(($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("param"))) {
                    $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
                    $_ngcc_current_state = 21;
                }
                else {
                    if((($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","alias"))>=0 || ($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","class"))>=0)) {
                        NGCCHandler h = new NGCCalias(this, super._source, $runtime, 94);
                        spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
                    }
                    else {
                        unexpectedEnterElement($__qname);
                    }
                }
            }
            break;
        case 63:
            {
                if(($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","class"))>=0) {
                    NGCCHandler h = new NGCCLocalClass(this, super._source, $runtime, 145, p,loc);
                    spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
                }
                else {
                    unexpectedEnterElement($__qname);
                }
            }
            break;
        case 50:
            {
                if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
                    $runtime.consumeAttribute($ai);
                    $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
                }
                else {
                    unexpectedEnterElement($__qname);
                }
            }
            break;
        case 105:
            {
                action17();
                $_ngcc_current_state = 104;
                $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
            }
            break;
        case 16:
            {
                if(($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("param"))) {
                    $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
                    $_ngcc_current_state = 21;
                }
                else {
                    $_ngcc_current_state = 15;
                    $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
                }
            }
            break;
        case 74:
            {
                if(($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","class"))>=0) {
                    NGCCHandler h = new NGCCLocalClass(this, super._source, $runtime, 156, p,loc);
                    spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
                }
                else {
                    unexpectedEnterElement($__qname);
                }
            }
            break;
        case 68:
            {
                if(($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","class"))>=0) {
                    NGCCHandler h = new NGCCLocalClass(this, super._source, $runtime, 150, p,loc);
                    spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
                }
                else {
                    unexpectedEnterElement($__qname);
                }
            }
            break;
        case 75:
            {
                if((($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("optional")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("list")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("notAllowed")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("interleave")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("ref")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("text")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("attribute")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("mixed")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("oneOrMore")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("choice")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("empty")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("data")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("parentRef")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("element")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("group")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("value")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("zeroOrMore")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("grammar")) || ($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("java"))))))))))))))))))))) {
                    NGCCHandler h = new patterns(this, super._source, $runtime, 157);
                    spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
                }
                else {
                    unexpectedEnterElement($__qname);
                }
            }
            break;
        case 25:
            {
                if(($ai = $runtime.getAttributeIndex("","type"))>=0) {
                    $runtime.consumeAttribute($ai);
                    $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
                }
                else {
                    unexpectedEnterElement($__qname);
                }
            }
            break;
        case 59:
            {
                if((($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","alias"))>=0 || (($ai = $runtime.getAttributeIndex("","name"))>=0 || ($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","with-params"))>=0))) {
                    NGCCHandler h = new NGCCcall(this, super._source, $runtime, 141);
                    spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
                }
                else {
                    unexpectedEnterElement($__qname);
                }
            }
            break;
        case 99:
            {
                if(($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","class"))>=0) {
                    NGCCHandler h = new NGCCLocalClass(this, super._source, $runtime, 183, p,loc);
                    spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
                }
                else {
                    unexpectedEnterElement($__qname);
                }
            }
            break;
        case 51:
            {
                if((($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","alias"))>=0 || (($ai = $runtime.getAttributeIndex("","name"))>=0 || ($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","with-params"))>=0))) {
                    NGCCHandler h = new NGCCcall(this, super._source, $runtime, 133);
                    spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
                }
                else {
                    unexpectedEnterElement($__qname);
                }
            }
            break;
        case 64:
            {
                if((($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("optional")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("list")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("notAllowed")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("interleave")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("ref")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("text")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("attribute")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("mixed")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("oneOrMore")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("choice")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("empty")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("data")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("parentRef")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("element")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("group")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("value")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("zeroOrMore")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("grammar")) || ($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("java"))))))))))))))))))))) {
                    NGCCHandler h = new patterns(this, super._source, $runtime, 146);
                    spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
                }
                else {
                    unexpectedEnterElement($__qname);
                }
            }
            break;
        case 100:
            {
                if((($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("optional")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("list")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("notAllowed")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("interleave")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("ref")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("text")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("attribute")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("mixed")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("oneOrMore")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("choice")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("empty")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("data")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("parentRef")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("element")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("group")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("value")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("zeroOrMore")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("grammar")) || ($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("java"))))))))))))))))))))) {
                    NGCCHandler h = new patterns(this, super._source, $runtime, 184);
                    spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
                }
                else {
                    unexpectedEnterElement($__qname);
                }
            }
            break;
        case 0:
            {
                revertToParentFromEnterElement(p, super._cookie, $__uri, $__local, $__qname, $attrs);
            }
            break;
        case 106:
            {
                if((($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("optional")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("list")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("notAllowed")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("interleave")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("ref")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("text")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("attribute")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("mixed")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("oneOrMore")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("choice")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("empty")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("data")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("parentRef")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("element")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("group")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("value")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("zeroOrMore")) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("grammar")) || ($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("java"))))))))))))))))))))) {
                    NGCCHandler h = new patterns(this, super._source, $runtime, 193);
                    spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
                }
                else {
                    if((($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","alias"))>=0 || ($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","class"))>=0)) {
                        NGCCHandler h = new NGCCalias(this, super._source, $runtime, 191);
                        spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
                    }
                    else {
                        unexpectedEnterElement($__qname);
                    }
                }
            }
            break;
        default:
            {
                unexpectedEnterElement($__qname);
            }
            break;
        }
    }

    public void leaveElement(String $__uri, String $__local, String $__qname) throws SAXException {
        int $ai;
        $uri = $__uri;
        $localName = $__local;
        $qname = $__qname;
        switch($_ngcc_current_state) {
        case 94:
            {
                if(((($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","class"))>=0 && ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("interleave"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("interleave")))) {
                    NGCCHandler h = new NGCCLocalClass(this, super._source, $runtime, 177, p,loc);
                    spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
                }
                else {
                    unexpectedLeaveElement($__qname);
                }
            }
            break;
        case 28:
            {
                if(($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("value"))) {
                    $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
                    $_ngcc_current_state = 0;
                }
                else {
                    unexpectedLeaveElement($__qname);
                }
            }
            break;
        case 2:
            {
                if(($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("java"))) {
                    $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
                    $_ngcc_current_state = 0;
                }
                else {
                    unexpectedLeaveElement($__qname);
                }
            }
            break;
        case 31:
            {
                if(($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","alias"))>=0) {
                    NGCCHandler h = new NGCCalias(this, super._source, $runtime, 112);
                    spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
                }
                else {
                    unexpectedLeaveElement($__qname);
                }
            }
            break;
        case 109:
            {
                if((($ai = $runtime.getAttributeIndex("","name"))>=0 && ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("attribute")))) {
                    NGCCHandler h = new name(this, super._source, $runtime, 194, true);
                    spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
                }
                else {
                    unexpectedLeaveElement($__qname);
                }
            }
            break;
        case 104:
            {
                if((($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("attribute")) || (($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","class"))>=0 && ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("attribute"))))) {
                    NGCCHandler h = new NGCCLocalClass(this, super._source, $runtime, 188, p,loc);
                    spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
                }
                else {
                    unexpectedLeaveElement($__qname);
                }
            }
            break;
        case 38:
            {
                if(($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("text"))) {
                    $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
                    $_ngcc_current_state = 0;
                }
                else {
                    unexpectedLeaveElement($__qname);
                }
            }
            break;
        case 73:
            {
                if(($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("oneOrMore"))) {
                    $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
                    $_ngcc_current_state = 0;
                }
                else {
                    unexpectedLeaveElement($__qname);
                }
            }
            break;
        case 14:
            {
                if((($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("data")) || (($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","class"))>=0 && ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("data"))))) {
                    NGCCHandler h = new NGCCLocalClass(this, super._source, $runtime, 93, p,loc);
                    spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
                }
                else {
                    unexpectedLeaveElement($__qname);
                }
            }
            break;
        case 47:
            {
                if(($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("parentRef"))) {
                    $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
                    $_ngcc_current_state = 0;
                }
                else {
                    unexpectedLeaveElement($__qname);
                }
            }
            break;
        case 39:
            {
                if((($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("text")) || (($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","class"))>=0 && ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("text"))))) {
                    NGCCHandler h = new NGCCLocalClass(this, super._source, $runtime, 121, p,loc);
                    spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
                }
                else {
                    unexpectedLeaveElement($__qname);
                }
            }
            break;
        case 93:
            {
                if(($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("interleave"))) {
                    $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
                    $_ngcc_current_state = 0;
                }
                else {
                    unexpectedLeaveElement($__qname);
                }
            }
            break;
        case 40:
            {
                if(((($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","alias"))>=0 && ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("text"))) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("text")) || (($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","class"))>=0 && ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("text")))))) {
                    NGCCHandler h = new NGCCalias(this, super._source, $runtime, 122);
                    spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
                }
                else {
                    unexpectedLeaveElement($__qname);
                }
            }
            break;
        case 44:
            {
                if((($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("empty")) || (($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","class"))>=0 && ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("empty"))))) {
                    NGCCHandler h = new NGCCLocalClass(this, super._source, $runtime, 126, p,loc);
                    spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
                }
                else {
                    unexpectedLeaveElement($__qname);
                }
            }
            break;
        case 29:
            {
                if((($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("value")) || (($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","class"))>=0 && ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("value"))))) {
                    NGCCHandler h = new NGCCLocalClass(this, super._source, $runtime, 110, p,loc);
                    spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
                }
                else {
                    unexpectedLeaveElement($__qname);
                }
            }
            break;
        case 88:
            {
                if(($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("choice"))) {
                    $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
                    $_ngcc_current_state = 0;
                }
                else {
                    unexpectedLeaveElement($__qname);
                }
            }
            break;
        case 7:
            {
                if(($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("grammar"))) {
                    NGCCHandler h = new GrammarContent(this, super._source, $runtime, 86);
                    spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
                }
                else {
                    unexpectedLeaveElement($__qname);
                }
            }
            break;
        case 79:
            {
                if((($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("zeroOrMore")) || (($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","class"))>=0 && ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("zeroOrMore"))))) {
                    NGCCHandler h = new NGCCLocalClass(this, super._source, $runtime, 161, p,loc);
                    spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
                }
                else {
                    unexpectedLeaveElement($__qname);
                }
            }
            break;
        case 50:
            {
                if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
                    $runtime.consumeAttribute($ai);
                    $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
                }
                else {
                    unexpectedLeaveElement($__qname);
                }
            }
            break;
        case 17:
            {
                if(($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("param"))) {
                    $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
                    $_ngcc_current_state = 15;
                }
                else {
                    unexpectedLeaveElement($__qname);
                }
            }
            break;
        case 6:
            {
                if(($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("grammar"))) {
                    $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
                    $_ngcc_current_state = 0;
                }
                else {
                    unexpectedLeaveElement($__qname);
                }
            }
            break;
        case 68:
            {
                if((($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("list")) || (($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","class"))>=0 && ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("list"))))) {
                    NGCCHandler h = new NGCCLocalClass(this, super._source, $runtime, 150, p,loc);
                    spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
                }
                else {
                    unexpectedLeaveElement($__qname);
                }
            }
            break;
        case 74:
            {
                if((($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("oneOrMore")) || (($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","class"))>=0 && ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("oneOrMore"))))) {
                    NGCCHandler h = new NGCCLocalClass(this, super._source, $runtime, 156, p,loc);
                    spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
                }
                else {
                    unexpectedLeaveElement($__qname);
                }
            }
            break;
        case 103:
            {
                if(($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("attribute"))) {
                    $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
                    $_ngcc_current_state = 0;
                }
                else {
                    unexpectedLeaveElement($__qname);
                }
            }
            break;
        case 25:
            {
                if(($ai = $runtime.getAttributeIndex("","type"))>=0) {
                    $runtime.consumeAttribute($ai);
                    $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
                }
                else {
                    unexpectedLeaveElement($__qname);
                }
            }
            break;
        case 111:
            {
                if(($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("element"))) {
                    $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
                    $_ngcc_current_state = 0;
                }
                else {
                    unexpectedLeaveElement($__qname);
                }
            }
            break;
        case 43:
            {
                if(($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("empty"))) {
                    $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
                    $_ngcc_current_state = 0;
                }
                else {
                    unexpectedLeaveElement($__qname);
                }
            }
            break;
        case 0:
            {
                revertToParentFromLeaveElement(p, super._cookie, $__uri, $__local, $__qname);
            }
            break;
        case 84:
            {
                if((($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("optional")) || (($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","class"))>=0 && ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("optional"))))) {
                    NGCCHandler h = new NGCCLocalClass(this, super._source, $runtime, 166, p,loc);
                    spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
                }
                else {
                    unexpectedLeaveElement($__qname);
                }
            }
            break;
        case 10:
            {
                if(($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("notAllowed"))) {
                    $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
                    $_ngcc_current_state = 0;
                }
                else {
                    unexpectedLeaveElement($__qname);
                }
            }
            break;
        case 114:
            {
                if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
                    NGCCHandler h = new name(this, super._source, $runtime, 200, false);
                    spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
                }
                else {
                    unexpectedLeaveElement($__qname);
                }
            }
            break;
        case 21:
            {
                if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
                    $runtime.consumeAttribute($ai);
                    $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
                }
                else {
                    unexpectedLeaveElement($__qname);
                }
            }
            break;
        case 32:
            {
                if(($ai = $runtime.getAttributeIndex("","type"))>=0) {
                    $runtime.consumeAttribute($ai);
                    $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
                }
                else {
                    $_ngcc_current_state = 31;
                    $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
                }
            }
            break;
        case 70:
            {
                if(($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","alias"))>=0) {
                    NGCCHandler h = new NGCCalias(this, super._source, $runtime, 152);
                    spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
                }
                else {
                    unexpectedLeaveElement($__qname);
                }
            }
            break;
        case 78:
            {
                if(($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("zeroOrMore"))) {
                    $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
                    $_ngcc_current_state = 0;
                }
                else {
                    unexpectedLeaveElement($__qname);
                }
            }
            break;
        case 54:
            {
                NGCCHandler h = new NGCCwithParams(this, super._source, $runtime, 136, params);
                spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
            }
            break;
        case 89:
            {
                if(((($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","class"))>=0 && ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("choice"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("choice")))) {
                    NGCCHandler h = new NGCCLocalClass(this, super._source, $runtime, 171, p,loc);
                    spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
                }
                else {
                    unexpectedLeaveElement($__qname);
                }
            }
            break;
        case 112:
            {
                if((($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("element")) || (($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","class"))>=0 && ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("element"))))) {
                    NGCCHandler h = new NGCCLocalClass(this, super._source, $runtime, 198, p,loc);
                    spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
                }
                else {
                    unexpectedLeaveElement($__qname);
                }
            }
            break;
        case 58:
            {
                if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
                    $runtime.consumeAttribute($ai);
                    $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
                }
                else {
                    unexpectedLeaveElement($__qname);
                }
            }
            break;
        case 83:
            {
                if(($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("optional"))) {
                    $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
                    $_ngcc_current_state = 0;
                }
                else {
                    unexpectedLeaveElement($__qname);
                }
            }
            break;
        case 63:
            {
                if((($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("mixed")) || (($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","class"))>=0 && ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("mixed"))))) {
                    NGCCHandler h = new NGCCLocalClass(this, super._source, $runtime, 145, p,loc);
                    spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
                }
                else {
                    unexpectedLeaveElement($__qname);
                }
            }
            break;
        case 15:
            {
                if(((($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","alias"))>=0 && ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("data"))) || (($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("data")) || (($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","class"))>=0 && ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("data")))))) {
                    NGCCHandler h = new NGCCalias(this, super._source, $runtime, 94);
                    spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
                }
                else {
                    unexpectedLeaveElement($__qname);
                }
            }
            break;
        case 55:
            {
                if(($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("ref"))) {
                    $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
                    $_ngcc_current_state = 54;
                }
                else {
                    unexpectedLeaveElement($__qname);
                }
            }
            break;
        case 13:
            {
                if(($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("data"))) {
                    $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
                    $_ngcc_current_state = 0;
                }
                else {
                    unexpectedLeaveElement($__qname);
                }
            }
            break;
        case 98:
            {
                if(($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("group"))) {
                    $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
                    $_ngcc_current_state = 0;
                }
                else {
                    unexpectedLeaveElement($__qname);
                }
            }
            break;
        case 67:
            {
                if(($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("list"))) {
                    $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
                    $_ngcc_current_state = 0;
                }
                else {
                    unexpectedLeaveElement($__qname);
                }
            }
            break;
        case 105:
            {
                action17();
                $_ngcc_current_state = 104;
                $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
            }
            break;
        case 16:
            {
                $_ngcc_current_state = 15;
                $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
            }
            break;
        case 59:
            {
                if(((($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","alias"))>=0 && ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("ref"))) || ((($ai = $runtime.getAttributeIndex("","name"))>=0 && ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("ref"))) || (($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","with-params"))>=0 && ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("ref")))))) {
                    NGCCHandler h = new NGCCcall(this, super._source, $runtime, 141);
                    spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
                }
                else {
                    unexpectedLeaveElement($__qname);
                }
            }
            break;
        case 99:
            {
                if((($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("group")) || (($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","class"))>=0 && ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("group"))))) {
                    NGCCHandler h = new NGCCLocalClass(this, super._source, $runtime, 183, p,loc);
                    spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
                }
                else {
                    unexpectedLeaveElement($__qname);
                }
            }
            break;
        case 62:
            {
                if(($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("mixed"))) {
                    $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
                    $_ngcc_current_state = 0;
                }
                else {
                    unexpectedLeaveElement($__qname);
                }
            }
            break;
        case 51:
            {
                if(((($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","alias"))>=0 && ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("parentRef"))) || ((($ai = $runtime.getAttributeIndex("","name"))>=0 && ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("parentRef"))) || (($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","with-params"))>=0 && ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("parentRef")))))) {
                    NGCCHandler h = new NGCCcall(this, super._source, $runtime, 133);
                    spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
                }
                else {
                    unexpectedLeaveElement($__qname);
                }
            }
            break;
        case 106:
            {
                if(((($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","alias"))>=0 && ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("attribute"))) || ((($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","class"))>=0 && ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("attribute"))) || ($__uri.equals("http://relaxng.org/ns/structure/1.0") && $__local.equals("attribute"))))) {
                    NGCCHandler h = new NGCCalias(this, super._source, $runtime, 191);
                    spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
                }
                else {
                    unexpectedLeaveElement($__qname);
                }
            }
            break;
        default:
            {
                unexpectedLeaveElement($__qname);
            }
            break;
        }
    }

    public void enterAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
        int $ai;
        $uri = $__uri;
        $localName = $__local;
        $qname = $__qname;
        switch($_ngcc_current_state) {
        case 94:
            {
                if(($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("class"))) {
                    NGCCHandler h = new NGCCLocalClass(this, super._source, $runtime, 177, p,loc);
                    spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
                }
                else {
                    unexpectedEnterAttribute($__qname);
                }
            }
            break;
        case 84:
            {
                if(($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("class"))) {
                    NGCCHandler h = new NGCCLocalClass(this, super._source, $runtime, 166, p,loc);
                    spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
                }
                else {
                    unexpectedEnterAttribute($__qname);
                }
            }
            break;
        case 114:
            {
                if(($__uri.equals("") && $__local.equals("name"))) {
                    NGCCHandler h = new name(this, super._source, $runtime, 200, false);
                    spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
                }
                else {
                    unexpectedEnterAttribute($__qname);
                }
            }
            break;
        case 21:
            {
                if(($__uri.equals("") && $__local.equals("name"))) {
                    $_ngcc_current_state = 20;
                }
                else {
                    unexpectedEnterAttribute($__qname);
                }
            }
            break;
        case 31:
            {
                if(($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("alias"))) {
                    NGCCHandler h = new NGCCalias(this, super._source, $runtime, 112);
                    spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
                }
                else {
                    unexpectedEnterAttribute($__qname);
                }
            }
            break;
        case 109:
            {
                if(($__uri.equals("") && $__local.equals("name"))) {
                    NGCCHandler h = new name(this, super._source, $runtime, 194, true);
                    spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
                }
                else {
                    unexpectedEnterAttribute($__qname);
                }
            }
            break;
        case 104:
            {
                if(($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("class"))) {
                    NGCCHandler h = new NGCCLocalClass(this, super._source, $runtime, 188, p,loc);
                    spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
                }
                else {
                    unexpectedEnterAttribute($__qname);
                }
            }
            break;
        case 32:
            {
                if(($__uri.equals("") && $__local.equals("type"))) {
                    $_ngcc_current_state = 34;
                }
                else {
                    $_ngcc_current_state = 31;
                    $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
                }
            }
            break;
        case 14:
            {
                if(($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("class"))) {
                    NGCCHandler h = new NGCCLocalClass(this, super._source, $runtime, 93, p,loc);
                    spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
                }
                else {
                    unexpectedEnterAttribute($__qname);
                }
            }
            break;
        case 70:
            {
                if(($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("alias"))) {
                    NGCCHandler h = new NGCCalias(this, super._source, $runtime, 152);
                    spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
                }
                else {
                    unexpectedEnterAttribute($__qname);
                }
            }
            break;
        case 39:
            {
                if(($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("class"))) {
                    NGCCHandler h = new NGCCLocalClass(this, super._source, $runtime, 121, p,loc);
                    spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
                }
                else {
                    unexpectedEnterAttribute($__qname);
                }
            }
            break;
        case 40:
            {
                if((($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("alias")) || ($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("class")))) {
                    NGCCHandler h = new NGCCalias(this, super._source, $runtime, 122);
                    spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
                }
                else {
                    unexpectedEnterAttribute($__qname);
                }
            }
            break;
        case 54:
            {
                NGCCHandler h = new NGCCwithParams(this, super._source, $runtime, 136, params);
                spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
            }
            break;
        case 44:
            {
                if(($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("class"))) {
                    NGCCHandler h = new NGCCLocalClass(this, super._source, $runtime, 126, p,loc);
                    spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
                }
                else {
                    unexpectedEnterAttribute($__qname);
                }
            }
            break;
        case 89:
            {
                if(($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("class"))) {
                    NGCCHandler h = new NGCCLocalClass(this, super._source, $runtime, 171, p,loc);
                    spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
                }
                else {
                    unexpectedEnterAttribute($__qname);
                }
            }
            break;
        case 29:
            {
                if(($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("class"))) {
                    NGCCHandler h = new NGCCLocalClass(this, super._source, $runtime, 110, p,loc);
                    spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
                }
                else {
                    unexpectedEnterAttribute($__qname);
                }
            }
            break;
        case 112:
            {
                if(($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("class"))) {
                    NGCCHandler h = new NGCCLocalClass(this, super._source, $runtime, 198, p,loc);
                    spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
                }
                else {
                    unexpectedEnterAttribute($__qname);
                }
            }
            break;
        case 58:
            {
                if(($__uri.equals("") && $__local.equals("name"))) {
                    $_ngcc_current_state = 57;
                }
                else {
                    unexpectedEnterAttribute($__qname);
                }
            }
            break;
        case 79:
            {
                if(($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("class"))) {
                    NGCCHandler h = new NGCCLocalClass(this, super._source, $runtime, 161, p,loc);
                    spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
                }
                else {
                    unexpectedEnterAttribute($__qname);
                }
            }
            break;
        case 15:
            {
                if((($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("alias")) || ($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("class")))) {
                    NGCCHandler h = new NGCCalias(this, super._source, $runtime, 94);
                    spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
                }
                else {
                    unexpectedEnterAttribute($__qname);
                }
            }
            break;
        case 63:
            {
                if(($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("class"))) {
                    NGCCHandler h = new NGCCLocalClass(this, super._source, $runtime, 145, p,loc);
                    spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
                }
                else {
                    unexpectedEnterAttribute($__qname);
                }
            }
            break;
        case 50:
            {
                if(($__uri.equals("") && $__local.equals("name"))) {
                    $_ngcc_current_state = 49;
                }
                else {
                    unexpectedEnterAttribute($__qname);
                }
            }
            break;
        case 105:
            {
                action17();
                $_ngcc_current_state = 104;
                $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
            }
            break;
        case 16:
            {
                $_ngcc_current_state = 15;
                $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
            }
            break;
        case 68:
            {
                if(($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("class"))) {
                    NGCCHandler h = new NGCCLocalClass(this, super._source, $runtime, 150, p,loc);
                    spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
                }
                else {
                    unexpectedEnterAttribute($__qname);
                }
            }
            break;
        case 74:
            {
                if(($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("class"))) {
                    NGCCHandler h = new NGCCLocalClass(this, super._source, $runtime, 156, p,loc);
                    spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
                }
                else {
                    unexpectedEnterAttribute($__qname);
                }
            }
            break;
        case 25:
            {
                if(($__uri.equals("") && $__local.equals("type"))) {
                    $_ngcc_current_state = 24;
                }
                else {
                    unexpectedEnterAttribute($__qname);
                }
            }
            break;
        case 59:
            {
                if((($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("alias")) || (($__uri.equals("") && $__local.equals("name")) || ($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("with-params"))))) {
                    NGCCHandler h = new NGCCcall(this, super._source, $runtime, 141);
                    spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
                }
                else {
                    unexpectedEnterAttribute($__qname);
                }
            }
            break;
        case 99:
            {
                if(($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("class"))) {
                    NGCCHandler h = new NGCCLocalClass(this, super._source, $runtime, 183, p,loc);
                    spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
                }
                else {
                    unexpectedEnterAttribute($__qname);
                }
            }
            break;
        case 51:
            {
                if((($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("alias")) || (($__uri.equals("") && $__local.equals("name")) || ($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("with-params"))))) {
                    NGCCHandler h = new NGCCcall(this, super._source, $runtime, 133);
                    spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
                }
                else {
                    unexpectedEnterAttribute($__qname);
                }
            }
            break;
        case 0:
            {
                revertToParentFromEnterAttribute(p, super._cookie, $__uri, $__local, $__qname);
            }
            break;
        case 106:
            {
                if((($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("alias")) || ($__uri.equals("http://www.xml.gr.jp/xmlns/relaxngcc") && $__local.equals("class")))) {
                    NGCCHandler h = new NGCCalias(this, super._source, $runtime, 191);
                    spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
                }
                else {
                    unexpectedEnterAttribute($__qname);
                }
            }
            break;
        default:
            {
                unexpectedEnterAttribute($__qname);
            }
            break;
        }
    }

    public void leaveAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
        int $ai;
        $uri = $__uri;
        $localName = $__local;
        $qname = $__qname;
        switch($_ngcc_current_state) {
        case 56:
            {
                if(($__uri.equals("") && $__local.equals("name"))) {
                    $_ngcc_current_state = 55;
                    action9();
                }
                else {
                    unexpectedLeaveAttribute($__qname);
                }
            }
            break;
        case 23:
            {
                if(($__uri.equals("") && $__local.equals("type"))) {
                    $_ngcc_current_state = 16;
                }
                else {
                    unexpectedLeaveAttribute($__qname);
                }
            }
            break;
        case 19:
            {
                if(($__uri.equals("") && $__local.equals("name"))) {
                    $_ngcc_current_state = 18;
                }
                else {
                    unexpectedLeaveAttribute($__qname);
                }
            }
            break;
        case 33:
            {
                if(($__uri.equals("") && $__local.equals("type"))) {
                    $_ngcc_current_state = 31;
                }
                else {
                    unexpectedLeaveAttribute($__qname);
                }
            }
            break;
        case 54:
            {
                NGCCHandler h = new NGCCwithParams(this, super._source, $runtime, 136, params);
                spawnChildFromLeaveAttribute(h, $__uri, $__local, $__qname);
            }
            break;
        case 105:
            {
                action17();
                $_ngcc_current_state = 104;
                $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
            }
            break;
        case 16:
            {
                $_ngcc_current_state = 15;
                $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
            }
            break;
        case 48:
            {
                if(($__uri.equals("") && $__local.equals("name"))) {
                    $_ngcc_current_state = 47;
                    action8();
                }
                else {
                    unexpectedLeaveAttribute($__qname);
                }
            }
            break;
        case 32:
            {
                $_ngcc_current_state = 31;
                $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
            }
            break;
        case 0:
            {
                revertToParentFromLeaveAttribute(p, super._cookie, $__uri, $__local, $__qname);
            }
            break;
        default:
            {
                unexpectedLeaveAttribute($__qname);
            }
            break;
        }
    }

    public void text(String $value) throws SAXException {
        int $ai;
        switch($_ngcc_current_state) {
        case 84:
            {
                if(($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","class"))>=0) {
                    NGCCHandler h = new NGCCLocalClass(this, super._source, $runtime, 166, p,loc);
                    spawnChildFromText(h, $value);
                }
            }
            break;
        case 94:
            {
                if(($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","class"))>=0) {
                    NGCCHandler h = new NGCCLocalClass(this, super._source, $runtime, 177, p,loc);
                    spawnChildFromText(h, $value);
                }
            }
            break;
        case 34:
            {
                if($value.equals("token")) {
                    $_ngcc_current_state = 33;
                }
            }
            break;
        case 20:
            {
                $_ngcc_current_state = 19;
            }
            break;
        case 30:
            {
                value = $value;
                $_ngcc_current_state = 29;
                action5();
            }
            break;
        case 49:
            {
                target = $value;
                $_ngcc_current_state = 48;
            }
            break;
        case 114:
            {
                if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
                    NGCCHandler h = new name(this, super._source, $runtime, 200, false);
                    spawnChildFromText(h, $value);
                }
            }
            break;
        case 57:
            {
                target = $value;
                $_ngcc_current_state = 56;
            }
            break;
        case 21:
            {
                if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
                    $runtime.consumeAttribute($ai);
                    $runtime.sendText(super._cookie, $value);
                }
            }
            break;
        case 31:
            {
                if(($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","alias"))>=0) {
                    NGCCHandler h = new NGCCalias(this, super._source, $runtime, 112);
                    spawnChildFromText(h, $value);
                }
                else {
                    NGCCHandler h = new NGCCalias(this, super._source, $runtime, 112);
                    spawnChildFromText(h, $value);
                }
            }
            break;
        case 109:
            {
                if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
                    NGCCHandler h = new name(this, super._source, $runtime, 194, true);
                    spawnChildFromText(h, $value);
                }
            }
            break;
        case 104:
            {
                if(($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","class"))>=0) {
                    NGCCHandler h = new NGCCLocalClass(this, super._source, $runtime, 188, p,loc);
                    spawnChildFromText(h, $value);
                }
            }
            break;
        case 18:
            {
                $_ngcc_current_state = 17;
            }
            break;
        case 32:
            {
                if(($ai = $runtime.getAttributeIndex("","type"))>=0) {
                    $runtime.consumeAttribute($ai);
                    $runtime.sendText(super._cookie, $value);
                }
                else {
                    $_ngcc_current_state = 31;
                    $runtime.sendText(super._cookie, $value);
                }
            }
            break;
        case 14:
            {
                if(($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","class"))>=0) {
                    NGCCHandler h = new NGCCLocalClass(this, super._source, $runtime, 93, p,loc);
                    spawnChildFromText(h, $value);
                }
            }
            break;
        case 70:
            {
                if(($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","alias"))>=0) {
                    NGCCHandler h = new NGCCalias(this, super._source, $runtime, 152);
                    spawnChildFromText(h, $value);
                }
            }
            break;
        case 39:
            {
                if(($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","class"))>=0) {
                    NGCCHandler h = new NGCCLocalClass(this, super._source, $runtime, 121, p,loc);
                    spawnChildFromText(h, $value);
                }
            }
            break;
        case 40:
            {
                if(($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","class"))>=0) {
                    NGCCHandler h = new NGCCalias(this, super._source, $runtime, 122);
                    spawnChildFromText(h, $value);
                }
                else {
                    if(($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","alias"))>=0) {
                        NGCCHandler h = new NGCCalias(this, super._source, $runtime, 122);
                        spawnChildFromText(h, $value);
                    }
                }
            }
            break;
        case 44:
            {
                if(($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","class"))>=0) {
                    NGCCHandler h = new NGCCLocalClass(this, super._source, $runtime, 126, p,loc);
                    spawnChildFromText(h, $value);
                }
            }
            break;
        case 54:
            {
                NGCCHandler h = new NGCCwithParams(this, super._source, $runtime, 136, params);
                spawnChildFromText(h, $value);
            }
            break;
        case 89:
            {
                if(($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","class"))>=0) {
                    NGCCHandler h = new NGCCLocalClass(this, super._source, $runtime, 171, p,loc);
                    spawnChildFromText(h, $value);
                }
            }
            break;
        case 29:
            {
                if(($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","class"))>=0) {
                    NGCCHandler h = new NGCCLocalClass(this, super._source, $runtime, 110, p,loc);
                    spawnChildFromText(h, $value);
                }
            }
            break;
        case 112:
            {
                if(($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","class"))>=0) {
                    NGCCHandler h = new NGCCLocalClass(this, super._source, $runtime, 198, p,loc);
                    spawnChildFromText(h, $value);
                }
            }
            break;
        case 24:
            {
                typeName = $value;
                $_ngcc_current_state = 23;
            }
            break;
        case 58:
            {
                if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
                    $runtime.consumeAttribute($ai);
                    $runtime.sendText(super._cookie, $value);
                }
            }
            break;
        case 79:
            {
                if(($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","class"))>=0) {
                    NGCCHandler h = new NGCCLocalClass(this, super._source, $runtime, 161, p,loc);
                    spawnChildFromText(h, $value);
                }
            }
            break;
        case 3:
            {
                value = $value;
                $_ngcc_current_state = 2;
                action0();
            }
            break;
        case 15:
            {
                if(($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","class"))>=0) {
                    NGCCHandler h = new NGCCalias(this, super._source, $runtime, 94);
                    spawnChildFromText(h, $value);
                }
                else {
                    if(($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","alias"))>=0) {
                        NGCCHandler h = new NGCCalias(this, super._source, $runtime, 94);
                        spawnChildFromText(h, $value);
                    }
                }
            }
            break;
        case 63:
            {
                if(($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","class"))>=0) {
                    NGCCHandler h = new NGCCLocalClass(this, super._source, $runtime, 145, p,loc);
                    spawnChildFromText(h, $value);
                }
            }
            break;
        case 50:
            {
                if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
                    $runtime.consumeAttribute($ai);
                    $runtime.sendText(super._cookie, $value);
                }
            }
            break;
        case 105:
            {
                action17();
                $_ngcc_current_state = 104;
                $runtime.sendText(super._cookie, $value);
            }
            break;
        case 16:
            {
                $_ngcc_current_state = 15;
                $runtime.sendText(super._cookie, $value);
            }
            break;
        case 74:
            {
                if(($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","class"))>=0) {
                    NGCCHandler h = new NGCCLocalClass(this, super._source, $runtime, 156, p,loc);
                    spawnChildFromText(h, $value);
                }
            }
            break;
        case 68:
            {
                if(($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","class"))>=0) {
                    NGCCHandler h = new NGCCLocalClass(this, super._source, $runtime, 150, p,loc);
                    spawnChildFromText(h, $value);
                }
            }
            break;
        case 25:
            {
                if(($ai = $runtime.getAttributeIndex("","type"))>=0) {
                    $runtime.consumeAttribute($ai);
                    $runtime.sendText(super._cookie, $value);
                }
            }
            break;
        case 59:
            {
                if(($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","with-params"))>=0) {
                    NGCCHandler h = new NGCCcall(this, super._source, $runtime, 141);
                    spawnChildFromText(h, $value);
                }
                else {
                    if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
                        NGCCHandler h = new NGCCcall(this, super._source, $runtime, 141);
                        spawnChildFromText(h, $value);
                    }
                    else {
                        if(($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","alias"))>=0) {
                            NGCCHandler h = new NGCCcall(this, super._source, $runtime, 141);
                            spawnChildFromText(h, $value);
                        }
                    }
                }
            }
            break;
        case 99:
            {
                if(($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","class"))>=0) {
                    NGCCHandler h = new NGCCLocalClass(this, super._source, $runtime, 183, p,loc);
                    spawnChildFromText(h, $value);
                }
            }
            break;
        case 51:
            {
                if(($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","with-params"))>=0) {
                    NGCCHandler h = new NGCCcall(this, super._source, $runtime, 133);
                    spawnChildFromText(h, $value);
                }
                else {
                    if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
                        NGCCHandler h = new NGCCcall(this, super._source, $runtime, 133);
                        spawnChildFromText(h, $value);
                    }
                    else {
                        if(($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","alias"))>=0) {
                            NGCCHandler h = new NGCCcall(this, super._source, $runtime, 133);
                            spawnChildFromText(h, $value);
                        }
                    }
                }
            }
            break;
        case 0:
            {
                revertToParentFromText(p, super._cookie, $value);
            }
            break;
        case 106:
            {
                if(($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","class"))>=0) {
                    NGCCHandler h = new NGCCalias(this, super._source, $runtime, 191);
                    spawnChildFromText(h, $value);
                }
                else {
                    if(($ai = $runtime.getAttributeIndex("http://www.xml.gr.jp/xmlns/relaxngcc","alias"))>=0) {
                        NGCCHandler h = new NGCCalias(this, super._source, $runtime, 191);
                        spawnChildFromText(h, $value);
                    }
                }
            }
            break;
        }
    }

    public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
        switch($__cookie__) {
        case 179:
            {
                child = ((Pattern)$__result__);
                action16();
                $_ngcc_current_state = 94;
            }
            break;
        case 177:
            {
                p = ((Pattern)$__result__);
                $_ngcc_current_state = 93;
            }
            break;
        case 112:
            {
                alias = ((String)$__result__);
                $_ngcc_current_state = 30;
            }
            break;
        case 194:
            {
                name = ((NameClass)$__result__);
                $_ngcc_current_state = 106;
            }
            break;
        case 188:
            {
                p = ((Pattern)$__result__);
                $_ngcc_current_state = 103;
            }
            break;
        case 121:
            {
                p = ((Pattern)$__result__);
                $_ngcc_current_state = 38;
            }
            break;
        case 86:
            {
                action1();
                $_ngcc_current_state = 6;
            }
            break;
        case 161:
            {
                p = ((Pattern)$__result__);
                $_ngcc_current_state = 78;
            }
            break;
        case 172:
            {
                child = ((Pattern)$__result__);
                action15();
                $_ngcc_current_state = 89;
            }
            break;
        case 162:
            {
                p = ((Pattern)$__result__);
                action13();
                $_ngcc_current_state = 79;
            }
            break;
        case 152:
            {
                alias = ((String)$__result__);
                $_ngcc_current_state = 69;
            }
            break;
        case 136:
            {
                $_ngcc_current_state = 0;
            }
            break;
        case 167:
            {
                p = ((Pattern)$__result__);
                action14();
                $_ngcc_current_state = 84;
            }
            break;
        case 145:
            {
                p = ((Pattern)$__result__);
                $_ngcc_current_state = 62;
            }
            break;
        case 133:
            {
                params = ((NGCCCallParam)$__result__);
                $_ngcc_current_state = 50;
            }
            break;
        case 146:
            {
                p = ((Pattern)$__result__);
                action10();
                $_ngcc_current_state = 63;
            }
            break;
        case 193:
            {
                p = ((Pattern)$__result__);
                $_ngcc_current_state = 105;
            }
            break;
        case 191:
            {
                alias = ((String)$__result__);
                $_ngcc_current_state = 105;
            }
            break;
        case 178:
            {
                child = ((Pattern)$__result__);
                action16();
                $_ngcc_current_state = 94;
            }
            break;
        case 93:
            {
                p = ((Pattern)$__result__);
                $_ngcc_current_state = 13;
            }
            break;
        case 122:
            {
                alias = ((String)$__result__);
                action6();
                $_ngcc_current_state = 39;
            }
            break;
        case 126:
            {
                p = ((Pattern)$__result__);
                $_ngcc_current_state = 43;
            }
            break;
        case 110:
            {
                p = ((Pattern)$__result__);
                $_ngcc_current_state = 28;
            }
            break;
        case 150:
            {
                p = ((Pattern)$__result__);
                $_ngcc_current_state = 67;
            }
            break;
        case 156:
            {
                p = ((Pattern)$__result__);
                $_ngcc_current_state = 73;
            }
            break;
        case 184:
            {
                p = ((Pattern)$__result__);
                $_ngcc_current_state = 99;
            }
            break;
        case 166:
            {
                p = ((Pattern)$__result__);
                $_ngcc_current_state = 83;
            }
            break;
        case 200:
            {
                name = ((NameClass)$__result__);
                $_ngcc_current_state = 113;
            }
            break;
        case 199:
            {
                p = ((Pattern)$__result__);
                action18();
                $_ngcc_current_state = 112;
            }
            break;
        case 151:
            {
                p = ((Pattern)$__result__);
                action11();
                $_ngcc_current_state = 68;
            }
            break;
        case 173:
            {
                child = ((Pattern)$__result__);
                action15();
                $_ngcc_current_state = 89;
            }
            break;
        case 171:
            {
                p = ((Pattern)$__result__);
                $_ngcc_current_state = 88;
            }
            break;
        case 198:
            {
                p = ((Pattern)$__result__);
                $_ngcc_current_state = 111;
            }
            break;
        case 94:
            {
                alias = ((String)$__result__);
                action4();
                $_ngcc_current_state = 14;
            }
            break;
        case 157:
            {
                p = ((Pattern)$__result__);
                action12();
                $_ngcc_current_state = 74;
            }
            break;
        case 183:
            {
                p = ((Pattern)$__result__);
                $_ngcc_current_state = 98;
            }
            break;
        case 141:
            {
                params = ((NGCCCallParam)$__result__);
                $_ngcc_current_state = 58;
            }
            break;
        }
    }

    public boolean accepted() {
        return(($_ngcc_current_state == 0));
    }

    
      private Locator loc;
    
}

