001: /* this file is generated by RelaxNGCC */
002: package com.sun.xml.xsom.impl.parser.state;
003:
004: import org.xml.sax.SAXException;
005: import org.xml.sax.XMLReader;
006: import org.xml.sax.Attributes;
007: import com.sun.xml.xsom.impl.parser.NGCCRuntimeEx;
008:
009: import com.sun.xml.xsom.*;
010: import com.sun.xml.xsom.parser.*;
011: import com.sun.xml.xsom.impl.*;
012: import com.sun.xml.xsom.impl.parser.*;
013: import org.xml.sax.Locator;
014: import org.xml.sax.ContentHandler;
015: import org.xml.sax.helpers.*;
016: import java.util.*;
017:
018: class complexType_complexContent_body extends NGCCHandler {
019: private AttributesHolder owner;
020: protected final NGCCRuntimeEx $runtime;
021: private int $_ngcc_current_state;
022: protected String $uri;
023: protected String $localName;
024: protected String $qname;
025:
026: public final NGCCRuntime getRuntime() {
027: return ($runtime);
028: }
029:
030: public complexType_complexContent_body(NGCCHandler parent,
031: NGCCEventSource source, NGCCRuntimeEx runtime, int cookie,
032: AttributesHolder _owner) {
033: super (source, parent, cookie);
034: $runtime = runtime;
035: this .owner = _owner;
036: $_ngcc_current_state = 2;
037: }
038:
039: public complexType_complexContent_body(NGCCRuntimeEx runtime,
040: AttributesHolder _owner) {
041: this (null, runtime, runtime, -1, _owner);
042: }
043:
044: private void action0() throws SAXException {
045: if (particle == null)
046: particle = $runtime.parser.schemaSet.empty;
047: }
048:
049: public void enterElement(String $__uri, String $__local,
050: String $__qname, Attributes $attrs) throws SAXException {
051: int $ai;
052: $uri = $__uri;
053: $localName = $__local;
054: $qname = $__qname;
055: switch ($_ngcc_current_state) {
056: case 0: {
057: revertToParentFromEnterElement(particle, super ._cookie,
058: $__uri, $__local, $__qname, $attrs);
059: }
060: break;
061: case 1: {
062: if ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local
063: .equals("attributeGroup")) || (($__uri
064: .equals("http://www.w3.org/2001/XMLSchema") && $__local
065: .equals("anyAttribute")) || ($__uri
066: .equals("http://www.w3.org/2001/XMLSchema") && $__local
067: .equals("attribute"))))) {
068: NGCCHandler h = new attributeUses(this , super ._source,
069: $runtime, 515, owner);
070: spawnChildFromEnterElement(h, $__uri, $__local,
071: $__qname, $attrs);
072: } else {
073: NGCCHandler h = new attributeUses(this , super ._source,
074: $runtime, 515, owner);
075: spawnChildFromEnterElement(h, $__uri, $__local,
076: $__qname, $attrs);
077: }
078: }
079: break;
080: case 2: {
081: if ((((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local
082: .equals("all")) || ($__uri
083: .equals("http://www.w3.org/2001/XMLSchema") && $__local
084: .equals("choice"))) || ($__uri
085: .equals("http://www.w3.org/2001/XMLSchema") && $__local
086: .equals("sequence"))) || (($__uri
087: .equals("http://www.w3.org/2001/XMLSchema") && $__local
088: .equals("any")) || (($__uri
089: .equals("http://www.w3.org/2001/XMLSchema") && $__local
090: .equals("group")) || ($__uri
091: .equals("http://www.w3.org/2001/XMLSchema") && $__local
092: .equals("element")))))) {
093: NGCCHandler h = new particle(this , super ._source,
094: $runtime, 517);
095: spawnChildFromEnterElement(h, $__uri, $__local,
096: $__qname, $attrs);
097: } else {
098: $_ngcc_current_state = 1;
099: $runtime.sendEnterElement(super ._cookie, $__uri,
100: $__local, $__qname, $attrs);
101: }
102: }
103: break;
104: default: {
105: unexpectedEnterElement($__qname);
106: }
107: break;
108: }
109: }
110:
111: public void leaveElement(String $__uri, String $__local,
112: String $__qname) throws SAXException {
113: int $ai;
114: $uri = $__uri;
115: $localName = $__local;
116: $qname = $__qname;
117: switch ($_ngcc_current_state) {
118: case 0: {
119: revertToParentFromLeaveElement(particle, super ._cookie,
120: $__uri, $__local, $__qname);
121: }
122: break;
123: case 1: {
124: NGCCHandler h = new attributeUses(this , super ._source,
125: $runtime, 515, owner);
126: spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
127: }
128: break;
129: case 2: {
130: $_ngcc_current_state = 1;
131: $runtime.sendLeaveElement(super ._cookie, $__uri, $__local,
132: $__qname);
133: }
134: break;
135: default: {
136: unexpectedLeaveElement($__qname);
137: }
138: break;
139: }
140: }
141:
142: public void enterAttribute(String $__uri, String $__local,
143: String $__qname) throws SAXException {
144: int $ai;
145: $uri = $__uri;
146: $localName = $__local;
147: $qname = $__qname;
148: switch ($_ngcc_current_state) {
149: case 0: {
150: revertToParentFromEnterAttribute(particle, super ._cookie,
151: $__uri, $__local, $__qname);
152: }
153: break;
154: case 1: {
155: NGCCHandler h = new attributeUses(this , super ._source,
156: $runtime, 515, owner);
157: spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
158: }
159: break;
160: case 2: {
161: $_ngcc_current_state = 1;
162: $runtime.sendEnterAttribute(super ._cookie, $__uri,
163: $__local, $__qname);
164: }
165: break;
166: default: {
167: unexpectedEnterAttribute($__qname);
168: }
169: break;
170: }
171: }
172:
173: public void leaveAttribute(String $__uri, String $__local,
174: String $__qname) throws SAXException {
175: int $ai;
176: $uri = $__uri;
177: $localName = $__local;
178: $qname = $__qname;
179: switch ($_ngcc_current_state) {
180: case 0: {
181: revertToParentFromLeaveAttribute(particle, super ._cookie,
182: $__uri, $__local, $__qname);
183: }
184: break;
185: case 1: {
186: NGCCHandler h = new attributeUses(this , super ._source,
187: $runtime, 515, owner);
188: spawnChildFromLeaveAttribute(h, $__uri, $__local, $__qname);
189: }
190: break;
191: case 2: {
192: $_ngcc_current_state = 1;
193: $runtime.sendLeaveAttribute(super ._cookie, $__uri,
194: $__local, $__qname);
195: }
196: break;
197: default: {
198: unexpectedLeaveAttribute($__qname);
199: }
200: break;
201: }
202: }
203:
204: public void text(String $value) throws SAXException {
205: int $ai;
206: switch ($_ngcc_current_state) {
207: case 0: {
208: revertToParentFromText(particle, super ._cookie, $value);
209: }
210: break;
211: case 1: {
212: NGCCHandler h = new attributeUses(this , super ._source,
213: $runtime, 515, owner);
214: spawnChildFromText(h, $value);
215: }
216: break;
217: case 2: {
218: $_ngcc_current_state = 1;
219: $runtime.sendText(super ._cookie, $value);
220: }
221: break;
222: }
223: }
224:
225: public void onChildCompleted(Object $__result__, int $__cookie__,
226: boolean $__needAttCheck__) throws SAXException {
227: switch ($__cookie__) {
228: case 515: {
229: action0();
230: $_ngcc_current_state = 0;
231: }
232: break;
233: case 517: {
234: particle = ((ParticleImpl) $__result__);
235: $_ngcc_current_state = 1;
236: }
237: break;
238: }
239: }
240:
241: public boolean accepted() {
242: return (($_ngcc_current_state == 0));
243: }
244:
245: private ContentTypeImpl particle;
246:
247: }
|