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