Mon, 28 May 2018 10:36:45 +0800
Merge
1 /*
2 * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
26 /* this file is generated by RelaxNGCC */
27 package com.sun.xml.internal.xsom.impl.parser.state;
29 import com.sun.xml.internal.bind.WhiteSpaceProcessor;
30 import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx;
32 import org.xml.sax.Attributes;
33 import org.xml.sax.SAXException;
35 class qname extends NGCCHandler {
36 private String qvalue;
37 protected final NGCCRuntimeEx $runtime;
38 private int $_ngcc_current_state;
39 protected String $uri;
40 protected String $localName;
41 protected String $qname;
43 public final NGCCRuntime getRuntime() {
44 return($runtime);
45 }
47 public qname(NGCCHandler parent, NGCCEventSource source, NGCCRuntimeEx runtime, int cookie) {
48 super(source, parent, cookie);
49 $runtime = runtime;
50 $_ngcc_current_state = 1;
51 }
53 public qname(NGCCRuntimeEx runtime) {
54 this(null, runtime, runtime, -1);
55 }
57 public void enterElement(String $__uri, String $__local, String $__qname, Attributes $attrs) throws SAXException {
58 int $ai;
59 $uri = $__uri;
60 $localName = $__local;
61 $qname = $__qname;
62 switch($_ngcc_current_state) {
63 case 0:
64 {
65 revertToParentFromEnterElement($runtime.parseUName(qvalue), super._cookie, $__uri, $__local, $__qname, $attrs);
66 }
67 break;
68 default:
69 {
70 unexpectedEnterElement($__qname);
71 }
72 break;
73 }
74 }
76 public void leaveElement(String $__uri, String $__local, String $__qname) throws SAXException {
77 int $ai;
78 $uri = $__uri;
79 $localName = $__local;
80 $qname = $__qname;
81 switch($_ngcc_current_state) {
82 case 0:
83 {
84 revertToParentFromLeaveElement($runtime.parseUName(qvalue), super._cookie, $__uri, $__local, $__qname);
85 }
86 break;
87 default:
88 {
89 unexpectedLeaveElement($__qname);
90 }
91 break;
92 }
93 }
95 public void enterAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
96 int $ai;
97 $uri = $__uri;
98 $localName = $__local;
99 $qname = $__qname;
100 switch($_ngcc_current_state) {
101 case 0:
102 {
103 revertToParentFromEnterAttribute($runtime.parseUName(qvalue), super._cookie, $__uri, $__local, $__qname);
104 }
105 break;
106 default:
107 {
108 unexpectedEnterAttribute($__qname);
109 }
110 break;
111 }
112 }
114 public void leaveAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
115 int $ai;
116 $uri = $__uri;
117 $localName = $__local;
118 $qname = $__qname;
119 switch($_ngcc_current_state) {
120 case 0:
121 {
122 revertToParentFromLeaveAttribute($runtime.parseUName(qvalue), super._cookie, $__uri, $__local, $__qname);
123 }
124 break;
125 default:
126 {
127 unexpectedLeaveAttribute($__qname);
128 }
129 break;
130 }
131 }
133 public void text(String $value) throws SAXException {
134 int $ai;
135 switch($_ngcc_current_state) {
136 case 0:
137 {
138 revertToParentFromText($runtime.parseUName(qvalue), super._cookie, $value);
139 }
140 break;
141 case 1:
142 {
143 qvalue = WhiteSpaceProcessor.collapse($value);
144 $_ngcc_current_state = 0;
145 }
146 break;
147 }
148 }
150 public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
151 switch($__cookie__) {
152 }
153 }
155 public boolean accepted() {
156 return(($_ngcc_current_state == 0));
157 }
160 }