0001: /* this file is generated by RelaxNGCC */
0002: package com.sun.xml.xsom.impl.parser.state;
0003:
0004: import org.xml.sax.SAXException;
0005: import org.xml.sax.XMLReader;
0006: import org.xml.sax.Attributes;
0007: import com.sun.xml.xsom.impl.parser.NGCCRuntimeEx;
0008:
0009: import com.sun.xml.xsom.*;
0010: import com.sun.xml.xsom.parser.*;
0011: import com.sun.xml.xsom.impl.*;
0012: import com.sun.xml.xsom.impl.parser.*;
0013: import org.xml.sax.Locator;
0014: import org.xml.sax.ContentHandler;
0015: import org.xml.sax.helpers.*;
0016: import java.util.*;
0017:
0018: class elementDeclBody extends NGCCHandler {
0019: private Integer finalValue;
0020: private String name;
0021: private String nillable;
0022: private String abstractValue;
0023: private Integer blockValue;
0024: private ForeignAttributesImpl fa;
0025: private AnnotationImpl annotation;
0026: private Locator locator;
0027: private String defaultValue;
0028: private IdentityConstraintImpl idc;
0029: private boolean isGlobal;
0030: private String fixedValue;
0031: private UName typeName;
0032: private UName substRef;
0033: protected final NGCCRuntimeEx $runtime;
0034: private int $_ngcc_current_state;
0035: protected String $uri;
0036: protected String $localName;
0037: protected String $qname;
0038:
0039: public final NGCCRuntime getRuntime() {
0040: return ($runtime);
0041: }
0042:
0043: public elementDeclBody(NGCCHandler parent, NGCCEventSource source,
0044: NGCCRuntimeEx runtime, int cookie, Locator _locator,
0045: boolean _isGlobal) {
0046: super (source, parent, cookie);
0047: $runtime = runtime;
0048: this .locator = _locator;
0049: this .isGlobal = _isGlobal;
0050: $_ngcc_current_state = 48;
0051: }
0052:
0053: public elementDeclBody(NGCCRuntimeEx runtime, Locator _locator,
0054: boolean _isGlobal) {
0055: this (null, runtime, runtime, -1, _locator, _isGlobal);
0056: }
0057:
0058: private void action0() throws SAXException {
0059: idcs.add(idc);
0060: }
0061:
0062: private void action1() throws SAXException {
0063:
0064: type = new DelayedRef.Type($runtime, locator,
0065: $runtime.currentSchema, typeName);
0066:
0067: }
0068:
0069: private void action2() throws SAXException {
0070:
0071: substHeadRef = new DelayedRef.Element($runtime, locator,
0072: $runtime.currentSchema, substRef);
0073:
0074: }
0075:
0076: private void action3() throws SAXException {
0077: formSpecified = true;
0078: }
0079:
0080: public void enterElement(String $__uri, String $__local,
0081: String $__qname, Attributes $attrs) throws SAXException {
0082: int $ai;
0083: $uri = $__uri;
0084: $localName = $__local;
0085: $qname = $__qname;
0086: switch ($_ngcc_current_state) {
0087: case 24: {
0088: if (($ai = $runtime.getAttributeIndex("", "form")) >= 0) {
0089: $runtime.consumeAttribute($ai);
0090: $runtime.sendEnterElement(super ._cookie, $__uri,
0091: $__local, $__qname, $attrs);
0092: } else {
0093: $_ngcc_current_state = 23;
0094: $runtime.sendEnterElement(super ._cookie, $__uri,
0095: $__local, $__qname, $attrs);
0096: }
0097: }
0098: break;
0099: case 0: {
0100: if (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local
0101: .equals("key")) || ($__uri
0102: .equals("http://www.w3.org/2001/XMLSchema") && $__local
0103: .equals("keyref"))) || ($__uri
0104: .equals("http://www.w3.org/2001/XMLSchema") && $__local
0105: .equals("unique")))) {
0106: NGCCHandler h = new identityConstraint(this ,
0107: super ._source, $runtime, 451);
0108: spawnChildFromEnterElement(h, $__uri, $__local,
0109: $__qname, $attrs);
0110: } else {
0111: revertToParentFromEnterElement(makeResult(),
0112: super ._cookie, $__uri, $__local, $__qname,
0113: $attrs);
0114: }
0115: }
0116: break;
0117: case 11: {
0118: if (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local
0119: .equals("annotation"))) {
0120: NGCCHandler h = new annotation(this , super ._source,
0121: $runtime, 469, null,
0122: AnnotationContext.ELEMENT_DECL);
0123: spawnChildFromEnterElement(h, $__uri, $__local,
0124: $__qname, $attrs);
0125: } else {
0126: $_ngcc_current_state = 3;
0127: $runtime.sendEnterElement(super ._cookie, $__uri,
0128: $__local, $__qname, $attrs);
0129: }
0130: }
0131: break;
0132: case 17: {
0133: if (($ai = $runtime.getAttributeIndex("", "nillable")) >= 0) {
0134: $runtime.consumeAttribute($ai);
0135: $runtime.sendEnterElement(super ._cookie, $__uri,
0136: $__local, $__qname, $attrs);
0137: } else {
0138: $_ngcc_current_state = 13;
0139: $runtime.sendEnterElement(super ._cookie, $__uri,
0140: $__local, $__qname, $attrs);
0141: }
0142: }
0143: break;
0144: case 36: {
0145: if (($ai = $runtime.getAttributeIndex("", "final")) >= 0) {
0146: $runtime.consumeAttribute($ai);
0147: $runtime.sendEnterElement(super ._cookie, $__uri,
0148: $__local, $__qname, $attrs);
0149: } else {
0150: $_ngcc_current_state = 32;
0151: $runtime.sendEnterElement(super ._cookie, $__uri,
0152: $__local, $__qname, $attrs);
0153: }
0154: }
0155: break;
0156: case 1: {
0157: if (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local
0158: .equals("key")) || ($__uri
0159: .equals("http://www.w3.org/2001/XMLSchema") && $__local
0160: .equals("keyref"))) || ($__uri
0161: .equals("http://www.w3.org/2001/XMLSchema") && $__local
0162: .equals("unique")))) {
0163: NGCCHandler h = new identityConstraint(this ,
0164: super ._source, $runtime, 452);
0165: spawnChildFromEnterElement(h, $__uri, $__local,
0166: $__qname, $attrs);
0167: } else {
0168: $_ngcc_current_state = 0;
0169: $runtime.sendEnterElement(super ._cookie, $__uri,
0170: $__local, $__qname, $attrs);
0171: }
0172: }
0173: break;
0174: case 48: {
0175: if (((($ai = $runtime.getAttributeIndex("", "block")) >= 0 && (((($__uri
0176: .equals("http://www.w3.org/2001/XMLSchema") && $__local
0177: .equals("simpleType")) || ((($__uri
0178: .equals("http://www.w3.org/2001/XMLSchema") && $__local
0179: .equals("key")) || ($__uri
0180: .equals("http://www.w3.org/2001/XMLSchema") && $__local
0181: .equals("keyref"))) || ($__uri
0182: .equals("http://www.w3.org/2001/XMLSchema") && $__local
0183: .equals("unique")))) || ($__uri
0184: .equals("http://www.w3.org/2001/XMLSchema") && $__local
0185: .equals("annotation"))) || ($__uri
0186: .equals("http://www.w3.org/2001/XMLSchema") && $__local
0187: .equals("complexType")))) || ((($ai = $runtime
0188: .getAttributeIndex("", "default")) >= 0 && (((($__uri
0189: .equals("http://www.w3.org/2001/XMLSchema") && $__local
0190: .equals("simpleType")) || ((($__uri
0191: .equals("http://www.w3.org/2001/XMLSchema") && $__local
0192: .equals("key")) || ($__uri
0193: .equals("http://www.w3.org/2001/XMLSchema") && $__local
0194: .equals("keyref"))) || ($__uri
0195: .equals("http://www.w3.org/2001/XMLSchema") && $__local
0196: .equals("unique")))) || ($__uri
0197: .equals("http://www.w3.org/2001/XMLSchema") && $__local
0198: .equals("annotation"))) || ($__uri
0199: .equals("http://www.w3.org/2001/XMLSchema") && $__local
0200: .equals("complexType")))) || ((($ai = $runtime
0201: .getAttributeIndex("", "fixed")) >= 0 && (((($__uri
0202: .equals("http://www.w3.org/2001/XMLSchema") && $__local
0203: .equals("simpleType")) || ((($__uri
0204: .equals("http://www.w3.org/2001/XMLSchema") && $__local
0205: .equals("key")) || ($__uri
0206: .equals("http://www.w3.org/2001/XMLSchema") && $__local
0207: .equals("keyref"))) || ($__uri
0208: .equals("http://www.w3.org/2001/XMLSchema") && $__local
0209: .equals("unique")))) || ($__uri
0210: .equals("http://www.w3.org/2001/XMLSchema") && $__local
0211: .equals("annotation"))) || ($__uri
0212: .equals("http://www.w3.org/2001/XMLSchema") && $__local
0213: .equals("complexType")))) || ((($ai = $runtime
0214: .getAttributeIndex("", "abstract")) >= 0 && (((($__uri
0215: .equals("http://www.w3.org/2001/XMLSchema") && $__local
0216: .equals("simpleType")) || ((($__uri
0217: .equals("http://www.w3.org/2001/XMLSchema") && $__local
0218: .equals("key")) || ($__uri
0219: .equals("http://www.w3.org/2001/XMLSchema") && $__local
0220: .equals("keyref"))) || ($__uri
0221: .equals("http://www.w3.org/2001/XMLSchema") && $__local
0222: .equals("unique")))) || ($__uri
0223: .equals("http://www.w3.org/2001/XMLSchema") && $__local
0224: .equals("annotation"))) || ($__uri
0225: .equals("http://www.w3.org/2001/XMLSchema") && $__local
0226: .equals("complexType")))) || ((($ai = $runtime
0227: .getAttributeIndex("", "final")) >= 0 && (((($__uri
0228: .equals("http://www.w3.org/2001/XMLSchema") && $__local
0229: .equals("simpleType")) || ((($__uri
0230: .equals("http://www.w3.org/2001/XMLSchema") && $__local
0231: .equals("key")) || ($__uri
0232: .equals("http://www.w3.org/2001/XMLSchema") && $__local
0233: .equals("keyref"))) || ($__uri
0234: .equals("http://www.w3.org/2001/XMLSchema") && $__local
0235: .equals("unique")))) || ($__uri
0236: .equals("http://www.w3.org/2001/XMLSchema") && $__local
0237: .equals("annotation"))) || ($__uri
0238: .equals("http://www.w3.org/2001/XMLSchema") && $__local
0239: .equals("complexType")))) || ((($ai = $runtime
0240: .getAttributeIndex("", "form")) >= 0 && (((($__uri
0241: .equals("http://www.w3.org/2001/XMLSchema") && $__local
0242: .equals("simpleType")) || ((($__uri
0243: .equals("http://www.w3.org/2001/XMLSchema") && $__local
0244: .equals("key")) || ($__uri
0245: .equals("http://www.w3.org/2001/XMLSchema") && $__local
0246: .equals("keyref"))) || ($__uri
0247: .equals("http://www.w3.org/2001/XMLSchema") && $__local
0248: .equals("unique")))) || ($__uri
0249: .equals("http://www.w3.org/2001/XMLSchema") && $__local
0250: .equals("annotation"))) || ($__uri
0251: .equals("http://www.w3.org/2001/XMLSchema") && $__local
0252: .equals("complexType")))) || (($ai = $runtime
0253: .getAttributeIndex("", "name")) >= 0 && (((($__uri
0254: .equals("http://www.w3.org/2001/XMLSchema") && $__local
0255: .equals("simpleType")) || ((($__uri
0256: .equals("http://www.w3.org/2001/XMLSchema") && $__local
0257: .equals("key")) || ($__uri
0258: .equals("http://www.w3.org/2001/XMLSchema") && $__local
0259: .equals("keyref"))) || ($__uri
0260: .equals("http://www.w3.org/2001/XMLSchema") && $__local
0261: .equals("unique")))) || ($__uri
0262: .equals("http://www.w3.org/2001/XMLSchema") && $__local
0263: .equals("annotation"))) || ($__uri
0264: .equals("http://www.w3.org/2001/XMLSchema") && $__local
0265: .equals("complexType"))))))))))) {
0266: NGCCHandler h = new foreignAttributes(this ,
0267: super ._source, $runtime, 514, fa);
0268: spawnChildFromEnterElement(h, $__uri, $__local,
0269: $__qname, $attrs);
0270: } else {
0271: unexpectedEnterElement($__qname);
0272: }
0273: }
0274: break;
0275: case 28: {
0276: if (($ai = $runtime.getAttributeIndex("", "fixed")) >= 0) {
0277: $runtime.consumeAttribute($ai);
0278: $runtime.sendEnterElement(super ._cookie, $__uri,
0279: $__local, $__qname, $attrs);
0280: } else {
0281: $_ngcc_current_state = 24;
0282: $runtime.sendEnterElement(super ._cookie, $__uri,
0283: $__local, $__qname, $attrs);
0284: }
0285: }
0286: break;
0287: case 32: {
0288: if (($ai = $runtime.getAttributeIndex("", "default")) >= 0) {
0289: $runtime.consumeAttribute($ai);
0290: $runtime.sendEnterElement(super ._cookie, $__uri,
0291: $__local, $__qname, $attrs);
0292: } else {
0293: $_ngcc_current_state = 28;
0294: $runtime.sendEnterElement(super ._cookie, $__uri,
0295: $__local, $__qname, $attrs);
0296: }
0297: }
0298: break;
0299: case 13: {
0300: if (($ai = $runtime.getAttributeIndex("",
0301: "substitutionGroup")) >= 0) {
0302: $runtime.consumeAttribute($ai);
0303: $runtime.sendEnterElement(super ._cookie, $__uri,
0304: $__local, $__qname, $attrs);
0305: } else {
0306: $_ngcc_current_state = 11;
0307: $runtime.sendEnterElement(super ._cookie, $__uri,
0308: $__local, $__qname, $attrs);
0309: }
0310: }
0311: break;
0312: case 3: {
0313: if (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local
0314: .equals("simpleType"))) {
0315: NGCCHandler h = new simpleType(this , super ._source,
0316: $runtime, 464);
0317: spawnChildFromEnterElement(h, $__uri, $__local,
0318: $__qname, $attrs);
0319: } else {
0320: if (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local
0321: .equals("complexType"))) {
0322: NGCCHandler h = new complexType(this ,
0323: super ._source, $runtime, 465);
0324: spawnChildFromEnterElement(h, $__uri, $__local,
0325: $__qname, $attrs);
0326: } else {
0327: if (($ai = $runtime.getAttributeIndex("", "type")) >= 0) {
0328: $runtime.consumeAttribute($ai);
0329: $runtime.sendEnterElement(super ._cookie,
0330: $__uri, $__local, $__qname, $attrs);
0331: } else {
0332: $_ngcc_current_state = 1;
0333: $runtime.sendEnterElement(super ._cookie,
0334: $__uri, $__local, $__qname, $attrs);
0335: }
0336: }
0337: }
0338: }
0339: break;
0340: case 40: {
0341: if (($ai = $runtime.getAttributeIndex("", "block")) >= 0) {
0342: $runtime.consumeAttribute($ai);
0343: $runtime.sendEnterElement(super ._cookie, $__uri,
0344: $__local, $__qname, $attrs);
0345: } else {
0346: $_ngcc_current_state = 36;
0347: $runtime.sendEnterElement(super ._cookie, $__uri,
0348: $__local, $__qname, $attrs);
0349: }
0350: }
0351: break;
0352: case 23: {
0353: if (($ai = $runtime.getAttributeIndex("", "name")) >= 0) {
0354: $runtime.consumeAttribute($ai);
0355: $runtime.sendEnterElement(super ._cookie, $__uri,
0356: $__local, $__qname, $attrs);
0357: } else {
0358: unexpectedEnterElement($__qname);
0359: }
0360: }
0361: break;
0362: case 44: {
0363: if (($ai = $runtime.getAttributeIndex("", "abstract")) >= 0) {
0364: $runtime.consumeAttribute($ai);
0365: $runtime.sendEnterElement(super ._cookie, $__uri,
0366: $__local, $__qname, $attrs);
0367: } else {
0368: $_ngcc_current_state = 40;
0369: $runtime.sendEnterElement(super ._cookie, $__uri,
0370: $__local, $__qname, $attrs);
0371: }
0372: }
0373: break;
0374: default: {
0375: unexpectedEnterElement($__qname);
0376: }
0377: break;
0378: }
0379: }
0380:
0381: public void leaveElement(String $__uri, String $__local,
0382: String $__qname) throws SAXException {
0383: int $ai;
0384: $uri = $__uri;
0385: $localName = $__local;
0386: $qname = $__qname;
0387: switch ($_ngcc_current_state) {
0388: case 24: {
0389: if (($ai = $runtime.getAttributeIndex("", "form")) >= 0) {
0390: $runtime.consumeAttribute($ai);
0391: $runtime.sendLeaveElement(super ._cookie, $__uri,
0392: $__local, $__qname);
0393: } else {
0394: $_ngcc_current_state = 23;
0395: $runtime.sendLeaveElement(super ._cookie, $__uri,
0396: $__local, $__qname);
0397: }
0398: }
0399: break;
0400: case 0: {
0401: revertToParentFromLeaveElement(makeResult(), super ._cookie,
0402: $__uri, $__local, $__qname);
0403: }
0404: break;
0405: case 11: {
0406: $_ngcc_current_state = 3;
0407: $runtime.sendLeaveElement(super ._cookie, $__uri, $__local,
0408: $__qname);
0409: }
0410: break;
0411: case 17: {
0412: if (($ai = $runtime.getAttributeIndex("", "nillable")) >= 0) {
0413: $runtime.consumeAttribute($ai);
0414: $runtime.sendLeaveElement(super ._cookie, $__uri,
0415: $__local, $__qname);
0416: } else {
0417: $_ngcc_current_state = 13;
0418: $runtime.sendLeaveElement(super ._cookie, $__uri,
0419: $__local, $__qname);
0420: }
0421: }
0422: break;
0423: case 36: {
0424: if (($ai = $runtime.getAttributeIndex("", "final")) >= 0) {
0425: $runtime.consumeAttribute($ai);
0426: $runtime.sendLeaveElement(super ._cookie, $__uri,
0427: $__local, $__qname);
0428: } else {
0429: $_ngcc_current_state = 32;
0430: $runtime.sendLeaveElement(super ._cookie, $__uri,
0431: $__local, $__qname);
0432: }
0433: }
0434: break;
0435: case 1: {
0436: $_ngcc_current_state = 0;
0437: $runtime.sendLeaveElement(super ._cookie, $__uri, $__local,
0438: $__qname);
0439: }
0440: break;
0441: case 48: {
0442: if ((($ai = $runtime.getAttributeIndex("", "block")) >= 0 || (($ai = $runtime
0443: .getAttributeIndex("", "default")) >= 0 || (($ai = $runtime
0444: .getAttributeIndex("", "fixed")) >= 0 || (($ai = $runtime
0445: .getAttributeIndex("", "abstract")) >= 0 || (($ai = $runtime
0446: .getAttributeIndex("", "final")) >= 0 || (($ai = $runtime
0447: .getAttributeIndex("", "form")) >= 0 || ($ai = $runtime
0448: .getAttributeIndex("", "name")) >= 0))))))) {
0449: NGCCHandler h = new foreignAttributes(this ,
0450: super ._source, $runtime, 514, fa);
0451: spawnChildFromLeaveElement(h, $__uri, $__local,
0452: $__qname);
0453: } else {
0454: unexpectedLeaveElement($__qname);
0455: }
0456: }
0457: break;
0458: case 28: {
0459: if (($ai = $runtime.getAttributeIndex("", "fixed")) >= 0) {
0460: $runtime.consumeAttribute($ai);
0461: $runtime.sendLeaveElement(super ._cookie, $__uri,
0462: $__local, $__qname);
0463: } else {
0464: $_ngcc_current_state = 24;
0465: $runtime.sendLeaveElement(super ._cookie, $__uri,
0466: $__local, $__qname);
0467: }
0468: }
0469: break;
0470: case 32: {
0471: if (($ai = $runtime.getAttributeIndex("", "default")) >= 0) {
0472: $runtime.consumeAttribute($ai);
0473: $runtime.sendLeaveElement(super ._cookie, $__uri,
0474: $__local, $__qname);
0475: } else {
0476: $_ngcc_current_state = 28;
0477: $runtime.sendLeaveElement(super ._cookie, $__uri,
0478: $__local, $__qname);
0479: }
0480: }
0481: break;
0482: case 13: {
0483: if (($ai = $runtime.getAttributeIndex("",
0484: "substitutionGroup")) >= 0) {
0485: $runtime.consumeAttribute($ai);
0486: $runtime.sendLeaveElement(super ._cookie, $__uri,
0487: $__local, $__qname);
0488: } else {
0489: $_ngcc_current_state = 11;
0490: $runtime.sendLeaveElement(super ._cookie, $__uri,
0491: $__local, $__qname);
0492: }
0493: }
0494: break;
0495: case 3: {
0496: if (($ai = $runtime.getAttributeIndex("", "type")) >= 0) {
0497: $runtime.consumeAttribute($ai);
0498: $runtime.sendLeaveElement(super ._cookie, $__uri,
0499: $__local, $__qname);
0500: } else {
0501: $_ngcc_current_state = 1;
0502: $runtime.sendLeaveElement(super ._cookie, $__uri,
0503: $__local, $__qname);
0504: }
0505: }
0506: break;
0507: case 40: {
0508: if (($ai = $runtime.getAttributeIndex("", "block")) >= 0) {
0509: $runtime.consumeAttribute($ai);
0510: $runtime.sendLeaveElement(super ._cookie, $__uri,
0511: $__local, $__qname);
0512: } else {
0513: $_ngcc_current_state = 36;
0514: $runtime.sendLeaveElement(super ._cookie, $__uri,
0515: $__local, $__qname);
0516: }
0517: }
0518: break;
0519: case 23: {
0520: if (($ai = $runtime.getAttributeIndex("", "name")) >= 0) {
0521: $runtime.consumeAttribute($ai);
0522: $runtime.sendLeaveElement(super ._cookie, $__uri,
0523: $__local, $__qname);
0524: } else {
0525: unexpectedLeaveElement($__qname);
0526: }
0527: }
0528: break;
0529: case 44: {
0530: if (($ai = $runtime.getAttributeIndex("", "abstract")) >= 0) {
0531: $runtime.consumeAttribute($ai);
0532: $runtime.sendLeaveElement(super ._cookie, $__uri,
0533: $__local, $__qname);
0534: } else {
0535: $_ngcc_current_state = 40;
0536: $runtime.sendLeaveElement(super ._cookie, $__uri,
0537: $__local, $__qname);
0538: }
0539: }
0540: break;
0541: default: {
0542: unexpectedLeaveElement($__qname);
0543: }
0544: break;
0545: }
0546: }
0547:
0548: public void enterAttribute(String $__uri, String $__local,
0549: String $__qname) throws SAXException {
0550: int $ai;
0551: $uri = $__uri;
0552: $localName = $__local;
0553: $qname = $__qname;
0554: switch ($_ngcc_current_state) {
0555: case 24: {
0556: if (($__uri.equals("") && $__local.equals("form"))) {
0557: $_ngcc_current_state = 26;
0558: } else {
0559: $_ngcc_current_state = 23;
0560: $runtime.sendEnterAttribute(super ._cookie, $__uri,
0561: $__local, $__qname);
0562: }
0563: }
0564: break;
0565: case 0: {
0566: revertToParentFromEnterAttribute(makeResult(),
0567: super ._cookie, $__uri, $__local, $__qname);
0568: }
0569: break;
0570: case 11: {
0571: $_ngcc_current_state = 3;
0572: $runtime.sendEnterAttribute(super ._cookie, $__uri,
0573: $__local, $__qname);
0574: }
0575: break;
0576: case 17: {
0577: if (($__uri.equals("") && $__local.equals("nillable"))) {
0578: $_ngcc_current_state = 19;
0579: } else {
0580: $_ngcc_current_state = 13;
0581: $runtime.sendEnterAttribute(super ._cookie, $__uri,
0582: $__local, $__qname);
0583: }
0584: }
0585: break;
0586: case 36: {
0587: if (($__uri.equals("") && $__local.equals("final"))) {
0588: $_ngcc_current_state = 38;
0589: } else {
0590: $_ngcc_current_state = 32;
0591: $runtime.sendEnterAttribute(super ._cookie, $__uri,
0592: $__local, $__qname);
0593: }
0594: }
0595: break;
0596: case 1: {
0597: $_ngcc_current_state = 0;
0598: $runtime.sendEnterAttribute(super ._cookie, $__uri,
0599: $__local, $__qname);
0600: }
0601: break;
0602: case 48: {
0603: if ((($__uri.equals("") && $__local.equals("block")) || (($__uri
0604: .equals("") && $__local.equals("default")) || (($__uri
0605: .equals("") && $__local.equals("fixed")) || (($__uri
0606: .equals("") && $__local.equals("abstract")) || (($__uri
0607: .equals("") && $__local.equals("final")) || (($__uri
0608: .equals("") && $__local.equals("form")) || ($__uri
0609: .equals("") && $__local.equals("name"))))))))) {
0610: NGCCHandler h = new foreignAttributes(this ,
0611: super ._source, $runtime, 514, fa);
0612: spawnChildFromEnterAttribute(h, $__uri, $__local,
0613: $__qname);
0614: } else {
0615: unexpectedEnterAttribute($__qname);
0616: }
0617: }
0618: break;
0619: case 28: {
0620: if (($__uri.equals("") && $__local.equals("fixed"))) {
0621: $_ngcc_current_state = 30;
0622: } else {
0623: $_ngcc_current_state = 24;
0624: $runtime.sendEnterAttribute(super ._cookie, $__uri,
0625: $__local, $__qname);
0626: }
0627: }
0628: break;
0629: case 32: {
0630: if (($__uri.equals("") && $__local.equals("default"))) {
0631: $_ngcc_current_state = 34;
0632: } else {
0633: $_ngcc_current_state = 28;
0634: $runtime.sendEnterAttribute(super ._cookie, $__uri,
0635: $__local, $__qname);
0636: }
0637: }
0638: break;
0639: case 13: {
0640: if (($__uri.equals("") && $__local
0641: .equals("substitutionGroup"))) {
0642: $_ngcc_current_state = 15;
0643: } else {
0644: $_ngcc_current_state = 11;
0645: $runtime.sendEnterAttribute(super ._cookie, $__uri,
0646: $__local, $__qname);
0647: }
0648: }
0649: break;
0650: case 3: {
0651: if (($__uri.equals("") && $__local.equals("type"))) {
0652: $_ngcc_current_state = 6;
0653: } else {
0654: $_ngcc_current_state = 1;
0655: $runtime.sendEnterAttribute(super ._cookie, $__uri,
0656: $__local, $__qname);
0657: }
0658: }
0659: break;
0660: case 40: {
0661: if (($__uri.equals("") && $__local.equals("block"))) {
0662: $_ngcc_current_state = 42;
0663: } else {
0664: $_ngcc_current_state = 36;
0665: $runtime.sendEnterAttribute(super ._cookie, $__uri,
0666: $__local, $__qname);
0667: }
0668: }
0669: break;
0670: case 23: {
0671: if (($__uri.equals("") && $__local.equals("name"))) {
0672: $_ngcc_current_state = 22;
0673: } else {
0674: unexpectedEnterAttribute($__qname);
0675: }
0676: }
0677: break;
0678: case 44: {
0679: if (($__uri.equals("") && $__local.equals("abstract"))) {
0680: $_ngcc_current_state = 46;
0681: } else {
0682: $_ngcc_current_state = 40;
0683: $runtime.sendEnterAttribute(super ._cookie, $__uri,
0684: $__local, $__qname);
0685: }
0686: }
0687: break;
0688: default: {
0689: unexpectedEnterAttribute($__qname);
0690: }
0691: break;
0692: }
0693: }
0694:
0695: public void leaveAttribute(String $__uri, String $__local,
0696: String $__qname) throws SAXException {
0697: int $ai;
0698: $uri = $__uri;
0699: $localName = $__local;
0700: $qname = $__qname;
0701: switch ($_ngcc_current_state) {
0702: case 24: {
0703: $_ngcc_current_state = 23;
0704: $runtime.sendLeaveAttribute(super ._cookie, $__uri,
0705: $__local, $__qname);
0706: }
0707: break;
0708: case 45: {
0709: if (($__uri.equals("") && $__local.equals("abstract"))) {
0710: $_ngcc_current_state = 40;
0711: } else {
0712: unexpectedLeaveAttribute($__qname);
0713: }
0714: }
0715: break;
0716: case 29: {
0717: if (($__uri.equals("") && $__local.equals("fixed"))) {
0718: $_ngcc_current_state = 24;
0719: } else {
0720: unexpectedLeaveAttribute($__qname);
0721: }
0722: }
0723: break;
0724: case 5: {
0725: if (($__uri.equals("") && $__local.equals("type"))) {
0726: $_ngcc_current_state = 1;
0727: action1();
0728: } else {
0729: unexpectedLeaveAttribute($__qname);
0730: }
0731: }
0732: break;
0733: case 21: {
0734: if (($__uri.equals("") && $__local.equals("name"))) {
0735: $_ngcc_current_state = 17;
0736: } else {
0737: unexpectedLeaveAttribute($__qname);
0738: }
0739: }
0740: break;
0741: case 18: {
0742: if (($__uri.equals("") && $__local.equals("nillable"))) {
0743: $_ngcc_current_state = 13;
0744: } else {
0745: unexpectedLeaveAttribute($__qname);
0746: }
0747: }
0748: break;
0749: case 25: {
0750: if (($__uri.equals("") && $__local.equals("form"))) {
0751: $_ngcc_current_state = 23;
0752: } else {
0753: unexpectedLeaveAttribute($__qname);
0754: }
0755: }
0756: break;
0757: case 11: {
0758: $_ngcc_current_state = 3;
0759: $runtime.sendLeaveAttribute(super ._cookie, $__uri,
0760: $__local, $__qname);
0761: }
0762: break;
0763: case 0: {
0764: revertToParentFromLeaveAttribute(makeResult(),
0765: super ._cookie, $__uri, $__local, $__qname);
0766: }
0767: break;
0768: case 17: {
0769: $_ngcc_current_state = 13;
0770: $runtime.sendLeaveAttribute(super ._cookie, $__uri,
0771: $__local, $__qname);
0772: }
0773: break;
0774: case 1: {
0775: $_ngcc_current_state = 0;
0776: $runtime.sendLeaveAttribute(super ._cookie, $__uri,
0777: $__local, $__qname);
0778: }
0779: break;
0780: case 37: {
0781: if (($__uri.equals("") && $__local.equals("final"))) {
0782: $_ngcc_current_state = 32;
0783: } else {
0784: unexpectedLeaveAttribute($__qname);
0785: }
0786: }
0787: break;
0788: case 36: {
0789: $_ngcc_current_state = 32;
0790: $runtime.sendLeaveAttribute(super ._cookie, $__uri,
0791: $__local, $__qname);
0792: }
0793: break;
0794: case 14: {
0795: if (($__uri.equals("") && $__local
0796: .equals("substitutionGroup"))) {
0797: $_ngcc_current_state = 11;
0798: } else {
0799: unexpectedLeaveAttribute($__qname);
0800: }
0801: }
0802: break;
0803: case 28: {
0804: $_ngcc_current_state = 24;
0805: $runtime.sendLeaveAttribute(super ._cookie, $__uri,
0806: $__local, $__qname);
0807: }
0808: break;
0809: case 41: {
0810: if (($__uri.equals("") && $__local.equals("block"))) {
0811: $_ngcc_current_state = 36;
0812: } else {
0813: unexpectedLeaveAttribute($__qname);
0814: }
0815: }
0816: break;
0817: case 33: {
0818: if (($__uri.equals("") && $__local.equals("default"))) {
0819: $_ngcc_current_state = 28;
0820: } else {
0821: unexpectedLeaveAttribute($__qname);
0822: }
0823: }
0824: break;
0825: case 32: {
0826: $_ngcc_current_state = 28;
0827: $runtime.sendLeaveAttribute(super ._cookie, $__uri,
0828: $__local, $__qname);
0829: }
0830: break;
0831: case 13: {
0832: $_ngcc_current_state = 11;
0833: $runtime.sendLeaveAttribute(super ._cookie, $__uri,
0834: $__local, $__qname);
0835: }
0836: break;
0837: case 3: {
0838: $_ngcc_current_state = 1;
0839: $runtime.sendLeaveAttribute(super ._cookie, $__uri,
0840: $__local, $__qname);
0841: }
0842: break;
0843: case 44: {
0844: $_ngcc_current_state = 40;
0845: $runtime.sendLeaveAttribute(super ._cookie, $__uri,
0846: $__local, $__qname);
0847: }
0848: break;
0849: case 40: {
0850: $_ngcc_current_state = 36;
0851: $runtime.sendLeaveAttribute(super ._cookie, $__uri,
0852: $__local, $__qname);
0853: }
0854: break;
0855: default: {
0856: unexpectedLeaveAttribute($__qname);
0857: }
0858: break;
0859: }
0860: }
0861:
0862: public void text(String $value) throws SAXException {
0863: int $ai;
0864: switch ($_ngcc_current_state) {
0865: case 24: {
0866: if (($ai = $runtime.getAttributeIndex("", "form")) >= 0) {
0867: $runtime.consumeAttribute($ai);
0868: $runtime.sendText(super ._cookie, $value);
0869: } else {
0870: $_ngcc_current_state = 23;
0871: $runtime.sendText(super ._cookie, $value);
0872: }
0873: }
0874: break;
0875: case 19: {
0876: nillable = $value;
0877: $_ngcc_current_state = 18;
0878: }
0879: break;
0880: case 46: {
0881: abstractValue = $value;
0882: $_ngcc_current_state = 45;
0883: }
0884: break;
0885: case 6: {
0886: NGCCHandler h = new qname(this , super ._source, $runtime,
0887: 455);
0888: spawnChildFromText(h, $value);
0889: }
0890: break;
0891: case 34: {
0892: defaultValue = $value;
0893: $_ngcc_current_state = 33;
0894: }
0895: break;
0896: case 0: {
0897: revertToParentFromText(makeResult(), super ._cookie, $value);
0898: }
0899: break;
0900: case 11: {
0901: $_ngcc_current_state = 3;
0902: $runtime.sendText(super ._cookie, $value);
0903: }
0904: break;
0905: case 26: {
0906: if ($value.equals("unqualified")) {
0907: NGCCHandler h = new qualification(this , super ._source,
0908: $runtime, 485);
0909: spawnChildFromText(h, $value);
0910: } else {
0911: if ($value.equals("qualified")) {
0912: NGCCHandler h = new qualification(this ,
0913: super ._source, $runtime, 485);
0914: spawnChildFromText(h, $value);
0915: }
0916: }
0917: }
0918: break;
0919: case 17: {
0920: if (($ai = $runtime.getAttributeIndex("", "nillable")) >= 0) {
0921: $runtime.consumeAttribute($ai);
0922: $runtime.sendText(super ._cookie, $value);
0923: } else {
0924: $_ngcc_current_state = 13;
0925: $runtime.sendText(super ._cookie, $value);
0926: }
0927: }
0928: break;
0929: case 22: {
0930: name = $value;
0931: $_ngcc_current_state = 21;
0932: }
0933: break;
0934: case 38: {
0935: NGCCHandler h = new erSet(this , super ._source, $runtime,
0936: 500);
0937: spawnChildFromText(h, $value);
0938: }
0939: break;
0940: case 1: {
0941: $_ngcc_current_state = 0;
0942: $runtime.sendText(super ._cookie, $value);
0943: }
0944: break;
0945: case 36: {
0946: if (($ai = $runtime.getAttributeIndex("", "final")) >= 0) {
0947: $runtime.consumeAttribute($ai);
0948: $runtime.sendText(super ._cookie, $value);
0949: } else {
0950: $_ngcc_current_state = 32;
0951: $runtime.sendText(super ._cookie, $value);
0952: }
0953: }
0954: break;
0955: case 48: {
0956: if (($ai = $runtime.getAttributeIndex("", "name")) >= 0) {
0957: NGCCHandler h = new foreignAttributes(this ,
0958: super ._source, $runtime, 514, fa);
0959: spawnChildFromText(h, $value);
0960: } else {
0961: if (($ai = $runtime.getAttributeIndex("", "form")) >= 0) {
0962: NGCCHandler h = new foreignAttributes(this ,
0963: super ._source, $runtime, 514, fa);
0964: spawnChildFromText(h, $value);
0965: } else {
0966: if (($ai = $runtime.getAttributeIndex("", "final")) >= 0) {
0967: NGCCHandler h = new foreignAttributes(this ,
0968: super ._source, $runtime, 514, fa);
0969: spawnChildFromText(h, $value);
0970: } else {
0971: if (($ai = $runtime.getAttributeIndex("",
0972: "abstract")) >= 0) {
0973: NGCCHandler h = new foreignAttributes(this ,
0974: super ._source, $runtime, 514, fa);
0975: spawnChildFromText(h, $value);
0976: } else {
0977: if (($ai = $runtime.getAttributeIndex("",
0978: "fixed")) >= 0) {
0979: NGCCHandler h = new foreignAttributes(
0980: this , super ._source, $runtime,
0981: 514, fa);
0982: spawnChildFromText(h, $value);
0983: } else {
0984: if (($ai = $runtime.getAttributeIndex(
0985: "", "default")) >= 0) {
0986: NGCCHandler h = new foreignAttributes(
0987: this , super ._source,
0988: $runtime, 514, fa);
0989: spawnChildFromText(h, $value);
0990: } else {
0991: if (($ai = $runtime
0992: .getAttributeIndex("",
0993: "block")) >= 0) {
0994: NGCCHandler h = new foreignAttributes(
0995: this , super ._source,
0996: $runtime, 514, fa);
0997: spawnChildFromText(h, $value);
0998: }
0999: }
1000: }
1001: }
1002: }
1003: }
1004: }
1005: }
1006: break;
1007: case 28: {
1008: if (($ai = $runtime.getAttributeIndex("", "fixed")) >= 0) {
1009: $runtime.consumeAttribute($ai);
1010: $runtime.sendText(super ._cookie, $value);
1011: } else {
1012: $_ngcc_current_state = 24;
1013: $runtime.sendText(super ._cookie, $value);
1014: }
1015: }
1016: break;
1017: case 32: {
1018: if (($ai = $runtime.getAttributeIndex("", "default")) >= 0) {
1019: $runtime.consumeAttribute($ai);
1020: $runtime.sendText(super ._cookie, $value);
1021: } else {
1022: $_ngcc_current_state = 28;
1023: $runtime.sendText(super ._cookie, $value);
1024: }
1025: }
1026: break;
1027: case 13: {
1028: if (($ai = $runtime.getAttributeIndex("",
1029: "substitutionGroup")) >= 0) {
1030: $runtime.consumeAttribute($ai);
1031: $runtime.sendText(super ._cookie, $value);
1032: } else {
1033: $_ngcc_current_state = 11;
1034: $runtime.sendText(super ._cookie, $value);
1035: }
1036: }
1037: break;
1038: case 15: {
1039: NGCCHandler h = new qname(this , super ._source, $runtime,
1040: 472);
1041: spawnChildFromText(h, $value);
1042: }
1043: break;
1044: case 3: {
1045: if (($ai = $runtime.getAttributeIndex("", "type")) >= 0) {
1046: $runtime.consumeAttribute($ai);
1047: $runtime.sendText(super ._cookie, $value);
1048: } else {
1049: $_ngcc_current_state = 1;
1050: $runtime.sendText(super ._cookie, $value);
1051: }
1052: }
1053: break;
1054: case 44: {
1055: if (($ai = $runtime.getAttributeIndex("", "abstract")) >= 0) {
1056: $runtime.consumeAttribute($ai);
1057: $runtime.sendText(super ._cookie, $value);
1058: } else {
1059: $_ngcc_current_state = 40;
1060: $runtime.sendText(super ._cookie, $value);
1061: }
1062: }
1063: break;
1064: case 23: {
1065: if (($ai = $runtime.getAttributeIndex("", "name")) >= 0) {
1066: $runtime.consumeAttribute($ai);
1067: $runtime.sendText(super ._cookie, $value);
1068: }
1069: }
1070: break;
1071: case 40: {
1072: if (($ai = $runtime.getAttributeIndex("", "block")) >= 0) {
1073: $runtime.consumeAttribute($ai);
1074: $runtime.sendText(super ._cookie, $value);
1075: } else {
1076: $_ngcc_current_state = 36;
1077: $runtime.sendText(super ._cookie, $value);
1078: }
1079: }
1080: break;
1081: case 42: {
1082: NGCCHandler h = new ersSet(this , super ._source, $runtime,
1083: 505);
1084: spawnChildFromText(h, $value);
1085: }
1086: break;
1087: case 30: {
1088: fixedValue = $value;
1089: $_ngcc_current_state = 29;
1090: }
1091: break;
1092: }
1093: }
1094:
1095: public void onChildCompleted(Object $__result__, int $__cookie__,
1096: boolean $__needAttCheck__) throws SAXException {
1097: switch ($__cookie__) {
1098: case 455: {
1099: typeName = ((UName) $__result__);
1100: $_ngcc_current_state = 5;
1101: }
1102: break;
1103: case 464: {
1104: type = ((SimpleTypeImpl) $__result__);
1105: $_ngcc_current_state = 1;
1106: }
1107: break;
1108: case 465: {
1109: type = ((ComplexTypeImpl) $__result__);
1110: $_ngcc_current_state = 1;
1111: }
1112: break;
1113: case 451: {
1114: idc = ((IdentityConstraintImpl) $__result__);
1115: action0();
1116: $_ngcc_current_state = 0;
1117: }
1118: break;
1119: case 469: {
1120: annotation = ((AnnotationImpl) $__result__);
1121: $_ngcc_current_state = 3;
1122: }
1123: break;
1124: case 500: {
1125: finalValue = ((Integer) $__result__);
1126: $_ngcc_current_state = 37;
1127: }
1128: break;
1129: case 505: {
1130: blockValue = ((Integer) $__result__);
1131: $_ngcc_current_state = 41;
1132: }
1133: break;
1134: case 485: {
1135: form = ((Boolean) $__result__).booleanValue();
1136: action3();
1137: $_ngcc_current_state = 25;
1138: }
1139: break;
1140: case 452: {
1141: idc = ((IdentityConstraintImpl) $__result__);
1142: action0();
1143: $_ngcc_current_state = 0;
1144: }
1145: break;
1146: case 514: {
1147: fa = ((ForeignAttributesImpl) $__result__);
1148: $_ngcc_current_state = 44;
1149: }
1150: break;
1151: case 472: {
1152: substRef = ((UName) $__result__);
1153: action2();
1154: $_ngcc_current_state = 14;
1155: }
1156: break;
1157: }
1158: }
1159:
1160: public boolean accepted() {
1161: return ((($_ngcc_current_state == 1) || (($_ngcc_current_state == 17) || (($_ngcc_current_state == 11) || (($_ngcc_current_state == 0) || (($_ngcc_current_state == 3) || ($_ngcc_current_state == 13)))))));
1162: }
1163:
1164: private boolean form;
1165: private boolean formSpecified;
1166: private Ref.Type type;
1167: private List idcs = new ArrayList(); // identity constraints
1168:
1169: private DelayedRef.Element substHeadRef;
1170:
1171: private ElementDecl makeResult() {
1172: if (finalValue == null)
1173: finalValue = new Integer($runtime.finalDefault);
1174: if (blockValue == null)
1175: blockValue = new Integer($runtime.blockDefault);
1176:
1177: if (!formSpecified)
1178: form = $runtime.elementFormDefault;
1179: if (isGlobal) // global elements are always qualified
1180: form = true;
1181:
1182: String tns;
1183: if (form)
1184: tns = $runtime.currentSchema.getTargetNamespace();
1185: else
1186: tns = "";
1187:
1188: if (type == null) {
1189: if (substHeadRef != null)
1190: type = new SubstGroupBaseTypeRef(substHeadRef);
1191: else
1192: type = $runtime.parser.schemaSet.anyType;
1193: }
1194:
1195: ElementDecl ed = new ElementDecl($runtime, $runtime.document,
1196: annotation, locator, fa, tns, name, !isGlobal, $runtime
1197: .createXmlString(defaultValue), $runtime
1198: .createXmlString(fixedValue), $runtime
1199: .parseBoolean(nillable), $runtime
1200: .parseBoolean(abstractValue), type,
1201: substHeadRef, blockValue.intValue(), finalValue
1202: .intValue(), idcs);
1203:
1204: // if this element has anonymous complex type, it will be set here.
1205: if (type instanceof ComplexTypeImpl)
1206: ((ComplexTypeImpl) type).setScope(ed);
1207: return ed;
1208: }
1209:
1210: }
|