001: /*
002: * The Apache Software License, Version 1.1
003: *
004: *
005: * Copyright (c) 2000 The Apache Software Foundation. All rights
006: * reserved.
007: *
008: * Redistribution and use in source and binary forms, with or without
009: * modification, are permitted provided that the following conditions
010: * are met:
011: *
012: * 1. Redistributions of source code must retain the above copyright
013: * notice, this list of conditions and the following disclaimer.
014: *
015: * 2. Redistributions in binary form must reproduce the above copyright
016: * notice, this list of conditions and the following disclaimer in
017: * the documentation and/or other materials provided with the
018: * distribution.
019: *
020: * 3. The end-user documentation included with the redistribution,
021: * if any, must include the following acknowledgment:
022: * "This product includes software developed by the
023: * Apache Software Foundation (http://www.apache.org/)."
024: * Alternately, this acknowledgment may appear in the software itself,
025: * if and wherever such third-party acknowledgments normally appear.
026: *
027: * 4. The names "Xerces" and "Apache Software Foundation" must
028: * not be used to endorse or promote products derived from this
029: * software without prior written permission. For written
030: * permission, please contact apache@apache.org.
031: *
032: * 5. Products derived from this software may not be called "Apache",
033: * nor may "Apache" appear in their name, without prior written
034: * permission of the Apache Software Foundation.
035: *
036: * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
037: * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
038: * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
039: * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
040: * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
041: * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
042: * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
043: * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
044: * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
045: * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
046: * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
047: * SUCH DAMAGE.
048: * ====================================================================
049: *
050: * This software consists of voluntary contributions made by many
051: * individuals on behalf of the Apache Software Foundation and was
052: * originally based on software copyright (c) 1999, International
053: * Business Machines, Inc., http://www.apache.org. For more
054: * information on the Apache Software Foundation, please see
055: * <http://www.apache.org/>.
056: */
057:
058: package org.apache.xerces.validators.schema;
059:
060: /**
061: * Collection of symbols used to parse a Schema Grammar
062: * We have temporary references to this class from
063: * SchemaImporter but we will be moving all the
064: * SchemaImporter functionality to the Grammar classes
065: *
066: * @author jeffrey rodriguez
067: */
068: public final class SchemaSymbols {
069: public static final String URI_XSI = "http://www.w3.org/2001/XMLSchema-instance";
070: public static final String URI_SCHEMAFORSCHEMA = "http://www.w3.org/2001/XMLSchema";
071: public static final String XSI_SCHEMALOCACTION = "schemaLocation";
072: public static final String XSI_NONAMESPACESCHEMALOCACTION = "noNamespaceSchemaLocation";
073: public static final String XSI_TYPE = "type";
074:
075: public static final String ELT_ALL = "all";
076: public static final String ELT_ANNOTATION = "annotation";
077: public static final String ELT_APPINFO = "appinfo";
078: public static final String ELT_DOCUMENTATION = "documentation";
079: public static final String ELT_ANY = "any";
080: public static final String ELT_WILDCARD = "any";
081: public static final String ELT_ANYATTRIBUTE = "anyAttribute";
082: public static final String ELT_ATTRIBUTE = "attribute";
083: public static final String ELT_ATTRIBUTEGROUP = "attributeGroup";
084: public static final String ELT_CHOICE = "choice";
085: public static final String ELT_COMPLEXTYPE = "complexType";
086: public static final String ELT_CONTENT = "content";
087: public static final String ELT_DURATION = "duration";
088: public static final String ELT_ELEMENT = "element";
089: public static final String ELT_ENUMERATION = "enumeration";
090: public static final String ELT_FIELD = "field";
091: public static final String ELT_WHITESPACE = "whiteSpace";
092: public static final String ELT_GROUP = "group";
093: public static final String ELT_IMPORT = "import";
094: public static final String ELT_INCLUDE = "include";
095: public static final String ELT_REDEFINE = "redefine";
096: public static final String ELT_KEY = "key";
097: public static final String ELT_KEYREF = "keyref";
098: public static final String ELT_LENGTH = "length";
099: public static final String ELT_MAXEXCLUSIVE = "maxExclusive";
100: public static final String ELT_MAXINCLUSIVE = "maxInclusive";
101: public static final String ELT_MAXLENGTH = "maxLength";
102: public static final String ELT_MINEXCLUSIVE = "minExclusive";
103: public static final String ELT_MININCLUSIVE = "minInclusive";
104: public static final String ELT_MINLENGTH = "minLength";
105: public static final String ELT_NOTATION = "notation";
106: public static final String ELT_PATTERN = "pattern";
107: public static final String ELT_PERIOD = "period";
108: public static final String ELT_TOTALDIGITS = "totalDigits";
109: public static final String ELT_FRACTIONDIGITS = "fractionDigits";
110: public static final String ELT_SCHEMA = "schema";
111: public static final String ELT_SELECTOR = "selector";
112: public static final String ELT_SEQUENCE = "sequence";
113: public static final String ELT_SIMPLETYPE = "simpleType";
114: public static final String ELT_UNION = "union";
115: public static final String ELT_LIST = "list";
116: public static final String ELT_UNIQUE = "unique";
117: public static final String ELT_COMPLEXCONTENT = "complexContent";
118: public static final String ELT_SIMPLECONTENT = "simpleContent";
119: public static final String ELT_RESTRICTION = "restriction";
120: public static final String ELT_EXTENSION = "extension";
121: public static final String ATT_ABSTRACT = "abstract";
122: public static final String ATT_ATTRIBUTEFORMDEFAULT = "attributeFormDefault";
123: public static final String ATT_BASE = "base";
124: public static final String ATT_ITEMTYPE = "itemType";
125: public static final String ATT_MEMBERTYPES = "memberTypes";
126: public static final String ATT_BLOCK = "block";
127: public static final String ATT_BLOCKDEFAULT = "blockDefault";
128: public static final String ATT_CONTENT = "content";
129: public static final String ATT_DEFAULT = "default";
130: public static final String ATT_DERIVEDBY = "derivedBy";
131: public static final String ATT_ELEMENTFORMDEFAULT = "elementFormDefault";
132: public static final String ATT_SUBSTITUTIONGROUP = "substitutionGroup";
133: public static final String ATT_FINAL = "final";
134: public static final String ATT_FINALDEFAULT = "finalDefault";
135: public static final String ATT_FIXED = "fixed";
136: public static final String ATT_FORM = "form";
137: public static final String ATT_ID = "id";
138: public static final String ATT_MAXOCCURS = "maxOccurs";
139: public static final String ATT_MINOCCURS = "minOccurs";
140: public static final String ATT_NAME = "name";
141: public static final String ATT_NAMESPACE = "namespace";
142: public static final String ATT_NILLABLE = "nillable";
143: public static final String ATT_NIL = "nil";
144: public static final String ATT_PROCESSCONTENTS = "processContents";
145: public static final String ATT_REF = "ref";
146: public static final String ATT_REFER = "refer";
147: public static final String ATT_SCHEMALOCATION = "schemaLocation";
148: public static final String ATT_SOURCE = "source";
149: public static final String ATT_SYSTEM = "system";
150: public static final String ATT_PUBLIC = "public";
151: public static final String ATT_TARGETNAMESPACE = "targetNamespace";
152: public static final String ATT_TYPE = "type";
153: public static final String ATT_USE = "use";
154: public static final String ATT_VALUE = "value";
155: public static final String ATT_MIXED = "mixed";
156: public static final String ATT_VERSION = "version";
157: public static final String ATT_XPATH = "xpath";
158: public static final String ATT_PRESERVE = "preserve";
159: public static final String ATT_REPLACE = "replace";
160: public static final String ATT_COLLAPSE = "collapse";
161: public static final String ATTVAL_TWOPOUNDANY = "##any";
162: public static final String ATTVAL_TWOPOUNDLOCAL = "##local";
163: public static final String ATTVAL_TWOPOUNDOTHER = "##other";
164: public static final String ATTVAL_TWOPOUNDTARGETNS = "##targetNamespace";
165: public static final String ATTVAL_POUNDALL = "#all";
166: public static final String ATTVAL_BOOLEAN = "boolean";
167: public static final String ATTVAL_DEFAULT = "default";
168: public static final String ATTVAL_ELEMENTONLY = "elementOnly";
169: public static final String ATTVAL_EMPTY = "empty";
170: public static final String ATTVAL_EXTENSION = "extension";
171: public static final String ATTVAL_FALSE = "false";
172: public static final String ATTVAL_FALSE_0 = "0";
173: public static final String ATTVAL_FIXED = "fixed";
174: public static final String ATTVAL_ID = "ID";
175: public static final String ATTVAL_LAX = "lax";
176: public static final String ATTVAL_MAXLENGTH = "maxLength";
177: public static final String ATTVAL_MINLENGTH = "minLength";
178: public static final String ATTVAL_MIXED = "mixed";
179: public static final String ATTVAL_NCNAME = "NCName";
180: public static final String ATTVAL_OPTIONAL = "optional";
181: public static final String ATTVAL_PROHIBITED = "prohibited";
182: public static final String ATTVAL_QNAME = "QName";
183: public static final String ATTVAL_QUALIFIED = "qualified";
184: public static final String ATTVAL_REQUIRED = "required";
185: public static final String ATTVAL_RESTRICTION = "restriction";
186: public static final String ATTVAL_SKIP = "skip";
187: public static final String ATTVAL_STRICT = "strict";
188: public static final String ATTVAL_STRING = "string";
189: public static final String ATTVAL_TEXTONLY = "textOnly";
190: public static final String ATTVAL_TIMEDURATION = "timeDuration";
191: public static final String ATTVAL_TRUE = "true";
192: public static final String ATTVAL_TRUE_1 = "1";
193: public static final String ATTVAL_UNBOUNDED = "unbounded";
194: public static final String ATTVAL_UNQUALIFIED = "unqualified";
195: public static final String ATTVAL_ANYURI = "anyURI";
196: public static final String ATTVAL_TOKEN = "token";
197: public static final String ATTVAL_SUBSTITUTIONGROUP = "substitutionGroup";
198: public static final String ATTVAL_SUBSTITUTION = "substitution";
199:
200: public static final int EMPTY_SET = 0;
201: public static final int EXTENSION = 1;
202: public static final int RESTRICTION = 2;
203: public static final int UNION = 4;
204: public static final int LIST = 8;
205: public static final int ENUMERATION = 16;
206: public static final int SUBSTITUTION = 32;
207:
208: public static final int CHOICE = 0; // group orders
209: public static final int SEQUENCE = 1; // group orders
210: public static final int ALL = 2; // group orders
211:
212: public static final int INFINITY = -1; // used for maxOccurs
213:
214: public static final int NILLABLE = 1;
215: public static final int ABSTRACT = 2;
216: public static final int FIXED = 4;
217:
218: public static final int OCCURRENCE_UNBOUNDED = -2;
219:
220: }
|