001: /*
002: * Copyright 2006 Sun Microsystems, Inc. All Rights Reserved.
003: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
004: *
005: * This code is free software; you can redistribute it and/or modify it
006: * under the terms of the GNU General Public License version 2 only, as
007: * published by the Free Software Foundation. Sun designates this
008: * particular file as subject to the "Classpath" exception as provided
009: * by Sun in the LICENSE file that accompanied this code.
010: *
011: * This code is distributed in the hope that it will be useful, but WITHOUT
012: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
013: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
014: * version 2 for more details (a copy is included in the LICENSE file that
015: * accompanied this code).
016: *
017: * You should have received a copy of the GNU General Public License version
018: * 2 along with this work; if not, write to the Free Software Foundation,
019: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
020: *
021: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
022: * CA 95054 USA or visit www.sun.com if you need additional information or
023: * have any questions.
024: */
025:
026: /* this file is generated by RelaxNGCC */
027: package com.sun.xml.internal.xsom.impl.parser.state;
028:
029: import org.xml.sax.SAXException;
030: import org.xml.sax.XMLReader;
031: import org.xml.sax.Attributes;
032: import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx;
033:
034: import com.sun.xml.internal.xsom.*;
035: import com.sun.xml.internal.xsom.parser.*;
036: import com.sun.xml.internal.xsom.impl.*;
037: import com.sun.xml.internal.xsom.impl.parser.*;
038: import org.xml.sax.Locator;
039: import org.xml.sax.ContentHandler;
040: import org.xml.sax.helpers.*;
041: import java.util.*;
042:
043: class qname extends NGCCHandler {
044: private String qvalue;
045: protected final NGCCRuntimeEx $runtime;
046: private int $_ngcc_current_state;
047: protected String $uri;
048: protected String $localName;
049: protected String $qname;
050:
051: public final NGCCRuntime getRuntime() {
052: return ($runtime);
053: }
054:
055: public qname(NGCCHandler parent, NGCCEventSource source,
056: NGCCRuntimeEx runtime, int cookie) {
057: super (source, parent, cookie);
058: $runtime = runtime;
059: $_ngcc_current_state = 1;
060: }
061:
062: public qname(NGCCRuntimeEx runtime) {
063: this (null, runtime, runtime, -1);
064: }
065:
066: public void enterElement(String $__uri, String $__local,
067: String $__qname, Attributes $attrs) throws SAXException {
068: int $ai;
069: $uri = $__uri;
070: $localName = $__local;
071: $qname = $__qname;
072: switch ($_ngcc_current_state) {
073: case 0: {
074: revertToParentFromEnterElement($runtime.parseUName(qvalue),
075: super ._cookie, $__uri, $__local, $__qname, $attrs);
076: }
077: break;
078: default: {
079: unexpectedEnterElement($__qname);
080: }
081: break;
082: }
083: }
084:
085: public void leaveElement(String $__uri, String $__local,
086: String $__qname) throws SAXException {
087: int $ai;
088: $uri = $__uri;
089: $localName = $__local;
090: $qname = $__qname;
091: switch ($_ngcc_current_state) {
092: case 0: {
093: revertToParentFromLeaveElement($runtime.parseUName(qvalue),
094: super ._cookie, $__uri, $__local, $__qname);
095: }
096: break;
097: default: {
098: unexpectedLeaveElement($__qname);
099: }
100: break;
101: }
102: }
103:
104: public void enterAttribute(String $__uri, String $__local,
105: String $__qname) throws SAXException {
106: int $ai;
107: $uri = $__uri;
108: $localName = $__local;
109: $qname = $__qname;
110: switch ($_ngcc_current_state) {
111: case 0: {
112: revertToParentFromEnterAttribute($runtime
113: .parseUName(qvalue), super ._cookie, $__uri,
114: $__local, $__qname);
115: }
116: break;
117: default: {
118: unexpectedEnterAttribute($__qname);
119: }
120: break;
121: }
122: }
123:
124: public void leaveAttribute(String $__uri, String $__local,
125: String $__qname) throws SAXException {
126: int $ai;
127: $uri = $__uri;
128: $localName = $__local;
129: $qname = $__qname;
130: switch ($_ngcc_current_state) {
131: case 0: {
132: revertToParentFromLeaveAttribute($runtime
133: .parseUName(qvalue), super ._cookie, $__uri,
134: $__local, $__qname);
135: }
136: break;
137: default: {
138: unexpectedLeaveAttribute($__qname);
139: }
140: break;
141: }
142: }
143:
144: public void text(String $value) throws SAXException {
145: int $ai;
146: switch ($_ngcc_current_state) {
147: case 1: {
148: qvalue = $value;
149: $_ngcc_current_state = 0;
150: }
151: break;
152: case 0: {
153: revertToParentFromText($runtime.parseUName(qvalue),
154: super ._cookie, $value);
155: }
156: break;
157: }
158: }
159:
160: public void onChildCompleted(Object $__result__, int $__cookie__,
161: boolean $__needAttCheck__) throws SAXException {
162: switch ($__cookie__) {
163: }
164: }
165:
166: public boolean accepted() {
167: return (($_ngcc_current_state == 0));
168: }
169:
170: }
|