1 /* 2 * Copyright (c) 1997, 2016, 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 */ 25 26 /* this file is generated by RelaxNGCC */ 27 package com.sun.xml.internal.xsom.impl.parser.state; 28 29 import org.xml.sax.SAXException; 30 import org.xml.sax.Attributes; 31 import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx; 32 33 class qname extends NGCCHandler { 34 private String qvalue; 35 protected final NGCCRuntimeEx $runtime; 36 private int $_ngcc_current_state; 37 protected String $uri; 38 protected String $localName; 39 protected String $qname; 40 41 public final NGCCRuntime getRuntime() { 42 return($runtime); 43 } 44 45 public qname(NGCCHandler parent, NGCCEventSource source, NGCCRuntimeEx runtime, int cookie) { 46 super(source, parent, cookie); 47 $runtime = runtime; 48 $_ngcc_current_state = 1; 49 } 50 51 public qname(NGCCRuntimeEx runtime) { 52 this(null, runtime, runtime, -1); 53 } 54 55 public void enterElement(String $__uri, String $__local, String $__qname, Attributes $attrs) throws SAXException { 56 int $ai; 57 $uri = $__uri; 58 $localName = $__local; 59 $qname = $__qname; 60 switch($_ngcc_current_state) { 61 case 0: 62 { 63 revertToParentFromEnterElement($runtime.parseUName(qvalue), super._cookie, $__uri, $__local, $__qname, $attrs); 64 } 65 break; 66 default: 67 { 68 unexpectedEnterElement($__qname); 69 } 70 break; 71 } 72 } 73 74 public void leaveElement(String $__uri, String $__local, String $__qname) throws SAXException { 75 int $ai; 76 $uri = $__uri; 77 $localName = $__local; 78 $qname = $__qname; 79 switch($_ngcc_current_state) { 80 case 0: 81 { 82 revertToParentFromLeaveElement($runtime.parseUName(qvalue), super._cookie, $__uri, $__local, $__qname); 83 } 84 break; 85 default: 86 { 87 unexpectedLeaveElement($__qname); 88 } 89 break; 90 } 91 } 92 93 public void enterAttribute(String $__uri, String $__local, String $__qname) throws SAXException { 94 int $ai; 95 $uri = $__uri; 96 $localName = $__local; 97 $qname = $__qname; 98 switch($_ngcc_current_state) { 99 case 0: 100 { 101 revertToParentFromEnterAttribute($runtime.parseUName(qvalue), super._cookie, $__uri, $__local, $__qname); 102 } 103 break; 104 default: 105 { 106 unexpectedEnterAttribute($__qname); 107 } 108 break; 109 } 110 } 111 112 public void leaveAttribute(String $__uri, String $__local, String $__qname) throws SAXException { 113 int $ai; 114 $uri = $__uri; 115 $localName = $__local; 116 $qname = $__qname; 117 switch($_ngcc_current_state) { 118 case 0: 119 { 120 revertToParentFromLeaveAttribute($runtime.parseUName(qvalue), super._cookie, $__uri, $__local, $__qname); 121 } 122 break; 123 default: 124 { 125 unexpectedLeaveAttribute($__qname); 126 } 127 break; 128 } 129 } 130 131 public void text(String $value) throws SAXException { 132 int $ai; 133 switch($_ngcc_current_state) { 134 case 0: 135 { 136 revertToParentFromText($runtime.parseUName(qvalue), super._cookie, $value); 137 } 138 break; 139 case 1: 140 { 141 qvalue = $runtime.collapse($value); 142 $_ngcc_current_state = 0; 143 } 144 break; 145 } 146 } 147 148 public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException { 149 switch($__cookie__) { 150 } 151 } 152 153 public boolean accepted() { 154 return(($_ngcc_current_state == 0)); 155 } 156 157 158 }