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 foreignAttributes extends NGCCHandler {
019: private ForeignAttributesImpl current;
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 foreignAttributes(NGCCHandler parent,
031: NGCCEventSource source, NGCCRuntimeEx runtime, int cookie,
032: ForeignAttributesImpl _current) {
033: super (source, parent, cookie);
034: $runtime = runtime;
035: this .current = _current;
036: $_ngcc_current_state = 0;
037: }
038:
039: public foreignAttributes(NGCCRuntimeEx runtime,
040: ForeignAttributesImpl _current) {
041: this (null, runtime, runtime, -1, _current);
042: }
043:
044: public void enterElement(String $__uri, String $__local,
045: String $__qname, Attributes $attrs) throws SAXException {
046: int $ai;
047: $uri = $__uri;
048: $localName = $__local;
049: $qname = $__qname;
050: switch ($_ngcc_current_state) {
051: case 0: {
052: revertToParentFromEnterElement(makeResult(), super ._cookie,
053: $__uri, $__local, $__qname, $attrs);
054: }
055: break;
056: default: {
057: unexpectedEnterElement($__qname);
058: }
059: break;
060: }
061: }
062:
063: public void leaveElement(String $__uri, String $__local,
064: String $__qname) throws SAXException {
065: int $ai;
066: $uri = $__uri;
067: $localName = $__local;
068: $qname = $__qname;
069: switch ($_ngcc_current_state) {
070: case 0: {
071: revertToParentFromLeaveElement(makeResult(), super ._cookie,
072: $__uri, $__local, $__qname);
073: }
074: break;
075: default: {
076: unexpectedLeaveElement($__qname);
077: }
078: break;
079: }
080: }
081:
082: public void enterAttribute(String $__uri, String $__local,
083: String $__qname) throws SAXException {
084: int $ai;
085: $uri = $__uri;
086: $localName = $__local;
087: $qname = $__qname;
088: switch ($_ngcc_current_state) {
089: case 0: {
090: revertToParentFromEnterAttribute(makeResult(),
091: super ._cookie, $__uri, $__local, $__qname);
092: }
093: break;
094: default: {
095: unexpectedEnterAttribute($__qname);
096: }
097: break;
098: }
099: }
100:
101: public void leaveAttribute(String $__uri, String $__local,
102: String $__qname) throws SAXException {
103: int $ai;
104: $uri = $__uri;
105: $localName = $__local;
106: $qname = $__qname;
107: switch ($_ngcc_current_state) {
108: case 0: {
109: revertToParentFromLeaveAttribute(makeResult(),
110: super ._cookie, $__uri, $__local, $__qname);
111: }
112: break;
113: default: {
114: unexpectedLeaveAttribute($__qname);
115: }
116: break;
117: }
118: }
119:
120: public void text(String $value) throws SAXException {
121: int $ai;
122: switch ($_ngcc_current_state) {
123: case 0: {
124: revertToParentFromText(makeResult(), super ._cookie, $value);
125: }
126: break;
127: }
128: }
129:
130: public void onChildCompleted(Object $__result__, int $__cookie__,
131: boolean $__needAttCheck__) throws SAXException {
132: switch ($__cookie__) {
133: }
134: }
135:
136: public boolean accepted() {
137: return (($_ngcc_current_state == 0));
138: }
139:
140: ForeignAttributesImpl makeResult() {
141: return $runtime.parseForeignAttributes(current);
142: }
143:
144: }
|