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 6:
       {
         if ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))
             || ($__uri.equals("http://www.w3.org/2001/XMLSchema")
                 && $__local.equals("simpleType")))) {
           NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 665, fa);
           spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
         } else {
           unexpectedEnterElement($__qname);
         }
       }
       break;
     case 0:
       {
         revertToParentFromEnterElement(result, super._cookie, $__uri, $__local, $__qname, $attrs);
       }
       break;
     case 12:
       {
         if (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("union"))) {
           $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
           action4();
           $_ngcc_current_state = 7;
         } else {
           unexpectedEnterElement($__qname);
         }
       }
       break;
     case 1:
       {
         if (($__uri.equals("http://www.w3.org/2001/XMLSchema")
             && $__local.equals("simpleType"))) {
           NGCCHandler h = new simpleType(this, super._source, $runtime, 659);
           spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
         } else {
           unexpectedEnterElement($__qname);
         }
       }
       break;
     case 7:
       {
         if (($ai = $runtime.getAttributeIndex("", "memberTypes")) >= 0) {
           $runtime.consumeAttribute($ai);
           $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
         } else {
           $_ngcc_current_state = 6;
           $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
         }
       }
       break;
     case 4:
       {
         if (($__uri.equals("http://www.w3.org/2001/XMLSchema")
             && $__local.equals("annotation"))) {
           NGCCHandler h =
               new annotation(
                   this,
                   super._source,
                   $runtime,
                   663,
                   annotation,
                   AnnotationContext.SIMPLETYPE_DECL);
           spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
         } else {
           $_ngcc_current_state = 2;
           $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
         }
       }
       break;
     case 2:
       {
         if (($__uri.equals("http://www.w3.org/2001/XMLSchema")
             && $__local.equals("simpleType"))) {
           NGCCHandler h = new simpleType(this, super._source, $runtime, 660);
           spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
         } else {
           $_ngcc_current_state = 1;
           $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
         }
       }
       break;
     default:
       {
         unexpectedEnterElement($__qname);
       }
       break;
   }
 }
 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 1:
       {
         if (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute"))) {
           $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
           action7();
           $_ngcc_current_state = 33;
         } else {
           if (($__uri.equals("http://www.w3.org/2001/XMLSchema")
               && $__local.equals("attributeGroup"))) {
             $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
             action3();
             $_ngcc_current_state = 13;
           } else {
             if (($__uri.equals("http://www.w3.org/2001/XMLSchema")
                 && $__local.equals("anyAttribute"))) {
               $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
               action1();
               $_ngcc_current_state = 3;
             } else {
               $_ngcc_current_state = 0;
               $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
             }
           }
         }
       }
       break;
     case 8:
       {
         action2();
         $_ngcc_current_state = 7;
         $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
       }
       break;
     case 3:
       {
         if ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))
             || (($ai = $runtime.getAttributeIndex("", "namespace")) >= 0
                 || ($ai = $runtime.getAttributeIndex("", "processContents")) >= 0))) {
           NGCCHandler h = new wildcardBody(this, super._source, $runtime, 290, wloc);
           spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
         } else {
           unexpectedEnterElement($__qname);
         }
       }
       break;
     case 17:
       {
         if ((($ai = $runtime.getAttributeIndex("", "name")) >= 0
             || ($ai = $runtime.getAttributeIndex("", "form")) >= 0)) {
           NGCCHandler h =
               new attributeDeclBody(
                   this, super._source, $runtime, 315, locator, true, defaultValue, fixedValue);
           spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
         } else {
           if (($ai = $runtime.getAttributeIndex("", "ref")) >= 0) {
             $runtime.consumeAttribute($ai);
             $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
           } else {
             unexpectedEnterElement($__qname);
           }
         }
       }
       break;
     case 33:
       {
         if (($ai = $runtime.getAttributeIndex("", "use")) >= 0) {
           $runtime.consumeAttribute($ai);
           $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
         } else {
           $_ngcc_current_state = 29;
           $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
         }
       }
       break;
     case 25:
       {
         if (($ai = $runtime.getAttributeIndex("", "fixed")) >= 0) {
           $runtime.consumeAttribute($ai);
           $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
         } else {
           $_ngcc_current_state = 17;
           $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
         }
       }
       break;
     case 29:
       {
         if (($ai = $runtime.getAttributeIndex("", "default")) >= 0) {
           $runtime.consumeAttribute($ai);
           $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
         } else {
           $_ngcc_current_state = 25;
           $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
         }
       }
       break;
     case 9:
       {
         if (($__uri.equals("http://www.w3.org/2001/XMLSchema")
             && $__local.equals("annotation"))) {
           NGCCHandler h =
               new annotation(
                   this, super._source, $runtime, 297, null, AnnotationContext.ATTRIBUTE_USE);
           spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
         } else {
           $_ngcc_current_state = 8;
           $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
         }
       }
       break;
     case 16:
       {
         action4();
         $_ngcc_current_state = 15;
         $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
       }
       break;
     case 5:
       {
         if (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute"))) {
           $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
           action7();
           $_ngcc_current_state = 33;
         } else {
           if (($__uri.equals("http://www.w3.org/2001/XMLSchema")
               && $__local.equals("attributeGroup"))) {
             $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
             action3();
             $_ngcc_current_state = 13;
           } else {
             $_ngcc_current_state = 1;
             $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
           }
         }
       }
       break;
     case 13:
       {
         if (($ai = $runtime.getAttributeIndex("", "ref")) >= 0) {
           $runtime.consumeAttribute($ai);
           $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
         } else {
           unexpectedEnterElement($__qname);
         }
       }
       break;
     case 19:
       {
         if (($__uri.equals("http://www.w3.org/2001/XMLSchema")
             && $__local.equals("annotation"))) {
           NGCCHandler h =
               new annotation(
                   this, super._source, $runtime, 308, null, AnnotationContext.ATTRIBUTE_USE);
           spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
         } else {
           $_ngcc_current_state = 18;
           $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
         }
       }
       break;
     case 0:
       {
         revertToParentFromEnterElement(this, super._cookie, $__uri, $__local, $__qname, $attrs);
       }
       break;
     default:
       {
         unexpectedEnterElement($__qname);
       }
       break;
   }
 }