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 elementDeclBody extends NGCCHandler {
46 private Integer finalValue;
47 private String name;
48 private String nillable;
49 private String abstractValue;
50 private Integer blockValue;
51 private ForeignAttributesImpl fa;
52 private AnnotationImpl annotation;
53 private Locator locator;
54 private String defaultValue;
55 private IdentityConstraintImpl idc;
56 private boolean isGlobal;
57 private String fixedValue;
58 private UName typeName;
59 private UName substRef;
60 protected final NGCCRuntimeEx $runtime;
61 private int $_ngcc_current_state;
796 case 17:
797 {
798 if(($ai = $runtime.getAttributeIndex("","nillable"))>=0) {
799 $runtime.consumeAttribute($ai);
800 $runtime.sendText(super._cookie, $value);
801 }
802 else {
803 $_ngcc_current_state = 13;
804 $runtime.sendText(super._cookie, $value);
805 }
806 }
807 break;
808 case 34:
809 {
810 defaultValue = $value;
811 $_ngcc_current_state = 33;
812 }
813 break;
814 case 22:
815 {
816 name = $value;
817 $_ngcc_current_state = 21;
818 }
819 break;
820 case 28:
821 {
822 if(($ai = $runtime.getAttributeIndex("","fixed"))>=0) {
823 $runtime.consumeAttribute($ai);
824 $runtime.sendText(super._cookie, $value);
825 }
826 else {
827 $_ngcc_current_state = 24;
828 $runtime.sendText(super._cookie, $value);
829 }
830 }
831 break;
832 case 32:
833 {
834 if(($ai = $runtime.getAttributeIndex("","default"))>=0) {
835 $runtime.consumeAttribute($ai);
836 $runtime.sendText(super._cookie, $value);
837 }
838 else {
839 $_ngcc_current_state = 28;
840 $runtime.sendText(super._cookie, $value);
841 }
842 }
843 break;
844 case 0:
845 {
846 revertToParentFromText(makeResult(), super._cookie, $value);
847 }
848 break;
849 case 6:
850 {
851 NGCCHandler h = new qname(this, super._source, $runtime, 10);
852 spawnChildFromText(h, $value);
853 }
854 break;
855 case 24:
856 {
857 if(($ai = $runtime.getAttributeIndex("","form"))>=0) {
858 $runtime.consumeAttribute($ai);
859 $runtime.sendText(super._cookie, $value);
860 }
861 else {
862 $_ngcc_current_state = 23;
863 $runtime.sendText(super._cookie, $value);
864 }
865 }
866 break;
867 case 11:
868 {
869 $_ngcc_current_state = 3;
870 $runtime.sendText(super._cookie, $value);
871 }
872 break;
985 case 13:
986 {
987 if(($ai = $runtime.getAttributeIndex("","substitutionGroup"))>=0) {
988 $runtime.consumeAttribute($ai);
989 $runtime.sendText(super._cookie, $value);
990 }
991 else {
992 $_ngcc_current_state = 11;
993 $runtime.sendText(super._cookie, $value);
994 }
995 }
996 break;
997 case 38:
998 {
999 NGCCHandler h = new erSet(this, super._source, $runtime, 55);
1000 spawnChildFromText(h, $value);
1001 }
1002 break;
1003 case 15:
1004 {
1005 NGCCHandler h = new qname(this, super._source, $runtime, 27);
1006 spawnChildFromText(h, $value);
1007 }
1008 break;
1009 case 26:
1010 {
1011 if($value.equals("unqualified")) {
1012 NGCCHandler h = new qualification(this, super._source, $runtime, 40);
1013 spawnChildFromText(h, $value);
1014 }
1015 else {
1016 if($value.equals("qualified")) {
1017 NGCCHandler h = new qualification(this, super._source, $runtime, 40);
1018 spawnChildFromText(h, $value);
1019 }
1020 }
1021 }
1022 break;
1023 case 36:
1024 {
1025 if(($ai = $runtime.getAttributeIndex("","final"))>=0) {
1026 $runtime.consumeAttribute($ai);
|
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.bind.WhiteSpaceProcessor;
32 import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx;
33
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 java.util.*;
39
40
41
42 class elementDeclBody extends NGCCHandler {
43 private Integer finalValue;
44 private String name;
45 private String nillable;
46 private String abstractValue;
47 private Integer blockValue;
48 private ForeignAttributesImpl fa;
49 private AnnotationImpl annotation;
50 private Locator locator;
51 private String defaultValue;
52 private IdentityConstraintImpl idc;
53 private boolean isGlobal;
54 private String fixedValue;
55 private UName typeName;
56 private UName substRef;
57 protected final NGCCRuntimeEx $runtime;
58 private int $_ngcc_current_state;
793 case 17:
794 {
795 if(($ai = $runtime.getAttributeIndex("","nillable"))>=0) {
796 $runtime.consumeAttribute($ai);
797 $runtime.sendText(super._cookie, $value);
798 }
799 else {
800 $_ngcc_current_state = 13;
801 $runtime.sendText(super._cookie, $value);
802 }
803 }
804 break;
805 case 34:
806 {
807 defaultValue = $value;
808 $_ngcc_current_state = 33;
809 }
810 break;
811 case 22:
812 {
813 // <xs:element> with attribute 'name' = $value
814 name = WhiteSpaceProcessor.collapse($value);
815 $_ngcc_current_state = 21;
816 }
817 break;
818 case 28:
819 {
820 if(($ai = $runtime.getAttributeIndex("","fixed"))>=0) {
821 $runtime.consumeAttribute($ai);
822 $runtime.sendText(super._cookie, $value);
823 }
824 else {
825 $_ngcc_current_state = 24;
826 $runtime.sendText(super._cookie, $value);
827 }
828 }
829 break;
830 case 32:
831 {
832 if(($ai = $runtime.getAttributeIndex("","default"))>=0) {
833 $runtime.consumeAttribute($ai);
834 $runtime.sendText(super._cookie, $value);
835 }
836 else {
837 $_ngcc_current_state = 28;
838 $runtime.sendText(super._cookie, $value);
839 }
840 }
841 break;
842 case 0:
843 {
844 revertToParentFromText(makeResult(), super._cookie, $value);
845 }
846 break;
847 case 6:
848 {
849 // <xs:element> with attribute 'type' = $value
850 NGCCHandler h = new qname(this, super._source, $runtime, 10);
851 spawnChildFromText(h, WhiteSpaceProcessor.collapse($value));
852 }
853 break;
854 case 24:
855 {
856 if(($ai = $runtime.getAttributeIndex("","form"))>=0) {
857 $runtime.consumeAttribute($ai);
858 $runtime.sendText(super._cookie, $value);
859 }
860 else {
861 $_ngcc_current_state = 23;
862 $runtime.sendText(super._cookie, $value);
863 }
864 }
865 break;
866 case 11:
867 {
868 $_ngcc_current_state = 3;
869 $runtime.sendText(super._cookie, $value);
870 }
871 break;
984 case 13:
985 {
986 if(($ai = $runtime.getAttributeIndex("","substitutionGroup"))>=0) {
987 $runtime.consumeAttribute($ai);
988 $runtime.sendText(super._cookie, $value);
989 }
990 else {
991 $_ngcc_current_state = 11;
992 $runtime.sendText(super._cookie, $value);
993 }
994 }
995 break;
996 case 38:
997 {
998 NGCCHandler h = new erSet(this, super._source, $runtime, 55);
999 spawnChildFromText(h, $value);
1000 }
1001 break;
1002 case 15:
1003 {
1004 // <xs:element> -> with attribute 'substitutionGroup' = $value
1005 NGCCHandler h = new qname(this, super._source, $runtime, 27);
1006 spawnChildFromText(h, WhiteSpaceProcessor.collapse($value));
1007 }
1008 break;
1009 case 26:
1010 {
1011 if($value.equals("unqualified")) {
1012 NGCCHandler h = new qualification(this, super._source, $runtime, 40);
1013 spawnChildFromText(h, $value);
1014 }
1015 else {
1016 if($value.equals("qualified")) {
1017 NGCCHandler h = new qualification(this, super._source, $runtime, 40);
1018 spawnChildFromText(h, $value);
1019 }
1020 }
1021 }
1022 break;
1023 case 36:
1024 {
1025 if(($ai = $runtime.getAttributeIndex("","final"))>=0) {
1026 $runtime.consumeAttribute($ai);
|