001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */
017:
018: package org.apache.xerces.impl.xs;
019:
020: /**
021: * Collection of symbols used to parse a Schema Grammar.
022: *
023: * @xerces.internal
024: *
025: * @author jeffrey rodriguez
026: * @version $Id: SchemaSymbols.java 446734 2006-09-15 20:51:23Z mrglavas $
027: */
028: public final class SchemaSymbols {
029:
030: // strings that's not added to the schema symbol table, because they
031: // are not symbols in the schema document.
032: // the validator can choose to add them by itself.
033:
034: // the following strings (xsi:, xsd) will be added into the
035: // symbol table that comes with the parser
036:
037: // xsi attributes: in validator
038: public static final String URI_XSI = "http://www.w3.org/2001/XMLSchema-instance"
039: .intern();
040: public static final String XSI_SCHEMALOCATION = "schemaLocation"
041: .intern();
042: public static final String XSI_NONAMESPACESCHEMALOCATION = "noNamespaceSchemaLocation"
043: .intern();
044: public static final String XSI_TYPE = "type".intern();
045: public static final String XSI_NIL = "nil".intern();
046:
047: // schema namespace
048: public static final String URI_SCHEMAFORSCHEMA = "http://www.w3.org/2001/XMLSchema"
049: .intern();
050:
051: // all possible schema element names
052: public static final String ELT_ALL = "all".intern();
053: public static final String ELT_ANNOTATION = "annotation".intern();
054: public static final String ELT_ANY = "any".intern();
055: public static final String ELT_ANYATTRIBUTE = "anyAttribute"
056: .intern();
057: public static final String ELT_APPINFO = "appinfo".intern();
058: public static final String ELT_ATTRIBUTE = "attribute".intern();
059: public static final String ELT_ATTRIBUTEGROUP = "attributeGroup"
060: .intern();
061: public static final String ELT_CHOICE = "choice".intern();
062: public static final String ELT_COMPLEXCONTENT = "complexContent"
063: .intern();
064: public static final String ELT_COMPLEXTYPE = "complexType".intern();
065: public static final String ELT_DOCUMENTATION = "documentation"
066: .intern();
067: public static final String ELT_ELEMENT = "element".intern();
068: public static final String ELT_ENUMERATION = "enumeration".intern();
069: public static final String ELT_EXTENSION = "extension".intern();
070: public static final String ELT_FIELD = "field".intern();
071: public static final String ELT_FRACTIONDIGITS = "fractionDigits"
072: .intern();
073: public static final String ELT_GROUP = "group".intern();
074: public static final String ELT_IMPORT = "import".intern();
075: public static final String ELT_INCLUDE = "include".intern();
076: public static final String ELT_KEY = "key".intern();
077: public static final String ELT_KEYREF = "keyref".intern();
078: public static final String ELT_LENGTH = "length".intern();
079: public static final String ELT_LIST = "list".intern();
080: public static final String ELT_MAXEXCLUSIVE = "maxExclusive"
081: .intern();
082: public static final String ELT_MAXINCLUSIVE = "maxInclusive"
083: .intern();
084: public static final String ELT_MAXLENGTH = "maxLength".intern();
085: public static final String ELT_MINEXCLUSIVE = "minExclusive"
086: .intern();
087: public static final String ELT_MININCLUSIVE = "minInclusive"
088: .intern();
089: public static final String ELT_MINLENGTH = "minLength".intern();
090: public static final String ELT_NOTATION = "notation".intern();
091: public static final String ELT_PATTERN = "pattern".intern();
092: public static final String ELT_REDEFINE = "redefine".intern();
093: public static final String ELT_RESTRICTION = "restriction".intern();
094: public static final String ELT_SCHEMA = "schema".intern();
095: public static final String ELT_SELECTOR = "selector".intern();
096: public static final String ELT_SEQUENCE = "sequence".intern();
097: public static final String ELT_SIMPLECONTENT = "simpleContent"
098: .intern();
099: public static final String ELT_SIMPLETYPE = "simpleType".intern();
100: public static final String ELT_TOTALDIGITS = "totalDigits".intern();
101: public static final String ELT_UNION = "union".intern();
102: public static final String ELT_UNIQUE = "unique".intern();
103: public static final String ELT_WHITESPACE = "whiteSpace".intern();
104:
105: // all possible schema attribute names (and xml:lang defined on <schema> and <documentation>)
106: public static final String ATT_ABSTRACT = "abstract".intern();
107: public static final String ATT_ATTRIBUTEFORMDEFAULT = "attributeFormDefault"
108: .intern();
109: public static final String ATT_BASE = "base".intern();
110: public static final String ATT_BLOCK = "block".intern();
111: public static final String ATT_BLOCKDEFAULT = "blockDefault"
112: .intern();
113: public static final String ATT_DEFAULT = "default".intern();
114: public static final String ATT_ELEMENTFORMDEFAULT = "elementFormDefault"
115: .intern();
116: public static final String ATT_FINAL = "final".intern();
117: public static final String ATT_FINALDEFAULT = "finalDefault"
118: .intern();
119: public static final String ATT_FIXED = "fixed".intern();
120: public static final String ATT_FORM = "form".intern();
121: public static final String ATT_ID = "id".intern();
122: public static final String ATT_ITEMTYPE = "itemType".intern();
123: public static final String ATT_MAXOCCURS = "maxOccurs".intern();
124: public static final String ATT_MEMBERTYPES = "memberTypes".intern();
125: public static final String ATT_MINOCCURS = "minOccurs".intern();
126: public static final String ATT_MIXED = "mixed".intern();
127: public static final String ATT_NAME = "name".intern();
128: public static final String ATT_NAMESPACE = "namespace".intern();
129: public static final String ATT_NILLABLE = "nillable".intern();
130: public static final String ATT_PROCESSCONTENTS = "processContents"
131: .intern();
132: public static final String ATT_REF = "ref".intern();
133: public static final String ATT_REFER = "refer".intern();
134: public static final String ATT_SCHEMALOCATION = "schemaLocation"
135: .intern();
136: public static final String ATT_SOURCE = "source".intern();
137: public static final String ATT_SUBSTITUTIONGROUP = "substitutionGroup"
138: .intern();
139: public static final String ATT_SYSTEM = "system".intern();
140: public static final String ATT_PUBLIC = "public".intern();
141: public static final String ATT_TARGETNAMESPACE = "targetNamespace"
142: .intern();
143: public static final String ATT_TYPE = "type".intern();
144: public static final String ATT_USE = "use".intern();
145: public static final String ATT_VALUE = "value".intern();
146: public static final String ATT_VERSION = "version".intern();
147: public static final String ATT_XML_LANG = "xml:lang".intern();
148: public static final String ATT_XPATH = "xpath".intern();
149:
150: // all possible schema attribute values
151: public static final String ATTVAL_TWOPOUNDANY = "##any";
152: public static final String ATTVAL_TWOPOUNDLOCAL = "##local";
153: public static final String ATTVAL_TWOPOUNDOTHER = "##other";
154: public static final String ATTVAL_TWOPOUNDTARGETNS = "##targetNamespace";
155: public static final String ATTVAL_POUNDALL = "#all";
156: public static final String ATTVAL_FALSE_0 = "0";
157: public static final String ATTVAL_TRUE_1 = "1";
158: public static final String ATTVAL_ANYSIMPLETYPE = "anySimpleType";
159: public static final String ATTVAL_ANYTYPE = "anyType";
160: public static final String ATTVAL_ANYURI = "anyURI";
161: public static final String ATTVAL_BASE64BINARY = "base64Binary";
162: public static final String ATTVAL_BOOLEAN = "boolean";
163: public static final String ATTVAL_BYTE = "byte";
164: public static final String ATTVAL_COLLAPSE = "collapse";
165: public static final String ATTVAL_DATE = "date";
166: public static final String ATTVAL_DATETIME = "dateTime";
167: public static final String ATTVAL_DAY = "gDay";
168: public static final String ATTVAL_DECIMAL = "decimal";
169: public static final String ATTVAL_DOUBLE = "double";
170: public static final String ATTVAL_DURATION = "duration";
171: public static final String ATTVAL_ENTITY = "ENTITY";
172: public static final String ATTVAL_ENTITIES = "ENTITIES";
173: public static final String ATTVAL_EXTENSION = "extension";
174: public static final String ATTVAL_FALSE = "false";
175: public static final String ATTVAL_FLOAT = "float";
176: public static final String ATTVAL_HEXBINARY = "hexBinary";
177: public static final String ATTVAL_ID = "ID";
178: public static final String ATTVAL_IDREF = "IDREF";
179: public static final String ATTVAL_IDREFS = "IDREFS";
180: public static final String ATTVAL_INT = "int";
181: public static final String ATTVAL_INTEGER = "integer";
182: public static final String ATTVAL_LANGUAGE = "language";
183: public static final String ATTVAL_LAX = "lax";
184: public static final String ATTVAL_LIST = "list";
185: public static final String ATTVAL_LONG = "long";
186: public static final String ATTVAL_NAME = "Name";
187: public static final String ATTVAL_NEGATIVEINTEGER = "negativeInteger";
188: public static final String ATTVAL_MONTH = "gMonth";
189: public static final String ATTVAL_MONTHDAY = "gMonthDay";
190: public static final String ATTVAL_NCNAME = "NCName";
191: public static final String ATTVAL_NMTOKEN = "NMTOKEN";
192: public static final String ATTVAL_NMTOKENS = "NMTOKENS";
193: public static final String ATTVAL_NONNEGATIVEINTEGER = "nonNegativeInteger";
194: public static final String ATTVAL_NONPOSITIVEINTEGER = "nonPositiveInteger";
195: public static final String ATTVAL_NORMALIZEDSTRING = "normalizedString";
196: public static final String ATTVAL_NOTATION = "NOTATION";
197: public static final String ATTVAL_OPTIONAL = "optional";
198: public static final String ATTVAL_POSITIVEINTEGER = "positiveInteger";
199: public static final String ATTVAL_PRESERVE = "preserve";
200: public static final String ATTVAL_PROHIBITED = "prohibited";
201: public static final String ATTVAL_QNAME = "QName";
202: public static final String ATTVAL_QUALIFIED = "qualified";
203: public static final String ATTVAL_REPLACE = "replace";
204: public static final String ATTVAL_REQUIRED = "required";
205: public static final String ATTVAL_RESTRICTION = "restriction";
206: public static final String ATTVAL_SHORT = "short";
207: public static final String ATTVAL_SKIP = "skip";
208: public static final String ATTVAL_STRICT = "strict";
209: public static final String ATTVAL_STRING = "string";
210: public static final String ATTVAL_SUBSTITUTION = "substitution";
211: public static final String ATTVAL_TIME = "time";
212: public static final String ATTVAL_TOKEN = "token";
213: public static final String ATTVAL_TRUE = "true";
214: public static final String ATTVAL_UNBOUNDED = "unbounded";
215: public static final String ATTVAL_UNION = "union";
216: public static final String ATTVAL_UNQUALIFIED = "unqualified";
217: public static final String ATTVAL_UNSIGNEDBYTE = "unsignedByte";
218: public static final String ATTVAL_UNSIGNEDINT = "unsignedInt";
219: public static final String ATTVAL_UNSIGNEDLONG = "unsignedLong";
220: public static final String ATTVAL_UNSIGNEDSHORT = "unsignedShort";
221: public static final String ATTVAL_YEAR = "gYear";
222: public static final String ATTVAL_YEARMONTH = "gYearMonth";
223:
224: // form qualified/unqualified
225: public static final short FORM_UNQUALIFIED = 0;
226: public static final short FORM_QUALIFIED = 1;
227:
228: // attribute use
229: public static final short USE_OPTIONAL = 0;
230: public static final short USE_REQUIRED = 1;
231: public static final short USE_PROHIBITED = 2;
232:
233: // maxOccurs = "unbounded"
234: public static final int OCCURRENCE_UNBOUNDED = -1;
235:
236: }
|