1 /*
2 * Copyright (c) 1997, 2013, 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 import org.xml.sax.SAXException;
29 import org.xml.sax.XMLReader;
30 import org.xml.sax.Attributes;
31 import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx;
32
33 import com.sun.xml.internal.xsom.*;
34 import com.sun.xml.internal.xsom.parser.*;
35 import com.sun.xml.internal.xsom.impl.*;
36 import com.sun.xml.internal.xsom.impl.parser.*;
37 import org.xml.sax.Locator;
38 import org.xml.sax.ContentHandler;
39 import org.xml.sax.helpers.*;
40 import java.util.*;
41 import java.math.BigInteger;
42
43
44
45 class simpleType extends NGCCHandler {
46 private AnnotationImpl annotation;
47 private String name;
48 private ForeignAttributesImpl fa;
49 private String finalValue;
50 protected final NGCCRuntimeEx $runtime;
51 private int $_ngcc_current_state;
52 protected String $uri;
53 protected String $localName;
54 protected String $qname;
55
56 public final NGCCRuntime getRuntime() {
57 return($runtime);
58 }
59
60 public simpleType(NGCCHandler parent, NGCCEventSource source, NGCCRuntimeEx runtime, int cookie) {
61 super(source, parent, cookie);
356 }
357 break;
358 case 0:
359 {
360 revertToParentFromLeaveAttribute(result, super._cookie, $__uri, $__local, $__qname);
361 }
362 break;
363 default:
364 {
365 unexpectedLeaveAttribute($__qname);
366 }
367 break;
368 }
369 }
370
371 public void text(String $value) throws SAXException {
372 int $ai;
373 switch($_ngcc_current_state) {
374 case 13:
375 {
376 name = $value;
377 $_ngcc_current_state = 12;
378 }
379 break;
380 case 15:
381 {
382 if(($ai = $runtime.getAttributeIndex("","final"))>=0) {
383 $runtime.consumeAttribute($ai);
384 $runtime.sendText(super._cookie, $value);
385 }
386 else {
387 $_ngcc_current_state = 11;
388 $runtime.sendText(super._cookie, $value);
389 }
390 }
391 break;
392 case 11:
393 {
394 if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
395 $runtime.consumeAttribute($ai);
396 $runtime.sendText(super._cookie, $value);
|
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 com.sun.xml.internal.bind.WhiteSpaceProcessor;
30 import com.sun.xml.internal.xsom.*;
31 import com.sun.xml.internal.xsom.impl.*;
32 import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx;
33 import com.sun.xml.internal.xsom.parser.*;
34
35 import java.util.*;
36 import org.xml.sax.Attributes;
37 import org.xml.sax.Locator;
38 import org.xml.sax.SAXException;
39
40
41
42 class simpleType extends NGCCHandler {
43 private AnnotationImpl annotation;
44 private String name;
45 private ForeignAttributesImpl fa;
46 private String finalValue;
47 protected final NGCCRuntimeEx $runtime;
48 private int $_ngcc_current_state;
49 protected String $uri;
50 protected String $localName;
51 protected String $qname;
52
53 public final NGCCRuntime getRuntime() {
54 return($runtime);
55 }
56
57 public simpleType(NGCCHandler parent, NGCCEventSource source, NGCCRuntimeEx runtime, int cookie) {
58 super(source, parent, cookie);
353 }
354 break;
355 case 0:
356 {
357 revertToParentFromLeaveAttribute(result, super._cookie, $__uri, $__local, $__qname);
358 }
359 break;
360 default:
361 {
362 unexpectedLeaveAttribute($__qname);
363 }
364 break;
365 }
366 }
367
368 public void text(String $value) throws SAXException {
369 int $ai;
370 switch($_ngcc_current_state) {
371 case 13:
372 {
373 // <xs:simpleType> with attribute 'name' = $value
374 name = WhiteSpaceProcessor.collapse($value);
375 $_ngcc_current_state = 12;
376 }
377 break;
378 case 15:
379 {
380 if(($ai = $runtime.getAttributeIndex("","final"))>=0) {
381 $runtime.consumeAttribute($ai);
382 $runtime.sendText(super._cookie, $value);
383 }
384 else {
385 $_ngcc_current_state = 11;
386 $runtime.sendText(super._cookie, $value);
387 }
388 }
389 break;
390 case 11:
391 {
392 if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
393 $runtime.consumeAttribute($ai);
394 $runtime.sendText(super._cookie, $value);
|