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 qualification extends NGCCHandler {
019: private String text;
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 qualification(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 qualification(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(new Boolean(text.trim()
050: .equals("qualified")), super ._cookie, $__uri,
051: $__local, $__qname, $attrs);
052: }
053: break;
054: default: {
055: unexpectedEnterElement($__qname);
056: }
057: break;
058: }
059: }
060:
061: public void leaveElement(String $__uri, String $__local,
062: String $__qname) throws SAXException {
063: int $ai;
064: $uri = $__uri;
065: $localName = $__local;
066: $qname = $__qname;
067: switch ($_ngcc_current_state) {
068: case 0: {
069: revertToParentFromLeaveElement(new Boolean(text.trim()
070: .equals("qualified")), super ._cookie, $__uri,
071: $__local, $__qname);
072: }
073: break;
074: default: {
075: unexpectedLeaveElement($__qname);
076: }
077: break;
078: }
079: }
080:
081: public void enterAttribute(String $__uri, String $__local,
082: String $__qname) throws SAXException {
083: int $ai;
084: $uri = $__uri;
085: $localName = $__local;
086: $qname = $__qname;
087: switch ($_ngcc_current_state) {
088: case 0: {
089: revertToParentFromEnterAttribute(new Boolean(text.trim()
090: .equals("qualified")), super ._cookie, $__uri,
091: $__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(new Boolean(text.trim()
110: .equals("qualified")), super ._cookie, $__uri,
111: $__local, $__qname);
112: }
113: break;
114: default: {
115: unexpectedLeaveAttribute($__qname);
116: }
117: break;
118: }
119: }
120:
121: public void text(String $value) throws SAXException {
122: int $ai;
123: switch ($_ngcc_current_state) {
124: case 0: {
125: revertToParentFromText(new Boolean(text.trim().equals(
126: "qualified")), super ._cookie, $value);
127: }
128: break;
129: case 1: {
130: if ($value.equals("qualified")) {
131: text = $value;
132: $_ngcc_current_state = 0;
133: } else {
134: if ($value.equals("unqualified")) {
135: text = $value;
136: $_ngcc_current_state = 0;
137: }
138: }
139: }
140: break;
141: }
142: }
143:
144: public void onChildCompleted(Object $__result__, int $__cookie__,
145: boolean $__needAttCheck__) throws SAXException {
146: switch ($__cookie__) {
147: }
148: }
149:
150: public boolean accepted() {
151: return (($_ngcc_current_state == 0));
152: }
153:
154: }
|