parses XML representation of XML Schema and constructs AGM.
ERR_BAD_XPATH
public static final String ERR_BAD_XPATH
ERR_DUPLICATE_ATTRIBUTE_DEFINITION
public static final String ERR_DUPLICATE_ATTRIBUTE_DEFINITION
ERR_DUPLICATE_ATTRIBUTE_GROUP_DEFINITION
public static final String ERR_DUPLICATE_ATTRIBUTE_GROUP_DEFINITION
ERR_DUPLICATE_COMPLEXTYPE_DEFINITION
public static final String ERR_DUPLICATE_COMPLEXTYPE_DEFINITION
ERR_DUPLICATE_ELEMENT_DEFINITION
public static final String ERR_DUPLICATE_ELEMENT_DEFINITION
ERR_DUPLICATE_GROUP_DEFINITION
public static final String ERR_DUPLICATE_GROUP_DEFINITION
ERR_DUPLICATE_IDENTITY_CONSTRAINT_DEFINITION
public static final String ERR_DUPLICATE_IDENTITY_CONSTRAINT_DEFINITION
ERR_DUPLICATE_SCHEMA_DEFINITION
public static final String ERR_DUPLICATE_SCHEMA_DEFINITION
ERR_IMPORTING_SAME_NAMESPACE
public static final String ERR_IMPORTING_SAME_NAMESPACE
ERR_INCONSISTENT_TARGETNAMESPACE
public static final String ERR_INCONSISTENT_TARGETNAMESPACE
ERR_INVALID_BASETYPE_FOR_SIMPLECONTENT
public static final String ERR_INVALID_BASETYPE_FOR_SIMPLECONTENT
ERR_KEYREF_REFERRING_NON_KEY
public static final String ERR_KEYREF_REFERRING_NON_KEY
ERR_KEY_FIELD_NUMBER_MISMATCH
public static final String ERR_KEY_FIELD_NUMBER_MISMATCH
ERR_MAXOCCURS_IS_NECESSARY
public static final String ERR_MAXOCCURS_IS_NECESSARY
ERR_RECURSIVE_SUBSTITUTION_GROUP
public static final String ERR_RECURSIVE_SUBSTITUTION_GROUP
ERR_REDEFINE_UNDEFINED
public static final String ERR_REDEFINE_UNDEFINED
ERR_UNDECLARED_PREFIX
public static final String ERR_UNDECLARED_PREFIX
ERR_UNDEFINED_ATTRIBUTE_DECL
public static final String ERR_UNDEFINED_ATTRIBUTE_DECL
ERR_UNDEFINED_ATTRIBUTE_GROUP
public static final String ERR_UNDEFINED_ATTRIBUTE_GROUP
ERR_UNDEFINED_COMPLEX_OR_SIMPLE_TYPE
public static final String ERR_UNDEFINED_COMPLEX_OR_SIMPLE_TYPE
ERR_UNDEFINED_COMPLEX_TYPE
public static final String ERR_UNDEFINED_COMPLEX_TYPE
ERR_UNDEFINED_ELEMENTTYPE
public static final String ERR_UNDEFINED_ELEMENTTYPE
ERR_UNDEFINED_ELEMENT_DECL
public static final String ERR_UNDEFINED_ELEMENT_DECL
ERR_UNDEFINED_GROUP
public static final String ERR_UNDEFINED_GROUP
ERR_UNDEFINED_KEY
public static final String ERR_UNDEFINED_KEY
ERR_UNDEFINED_OR_FORWARD_REFERENCED_TYPE
public static final String ERR_UNDEFINED_OR_FORWARD_REFERENCED_TYPE
ERR_UNDEFINED_SCHEMA
public static final String ERR_UNDEFINED_SCHEMA
ERR_UNDEFINED_SIMPLE_TYPE
public static final String ERR_UNDEFINED_SIMPLE_TYPE
ERR_UNIMPLEMENTED_FEATURE
public static final String ERR_UNIMPLEMENTED_FEATURE
ERR_UNRELATED_TYPES_IN_SUBSTITUTIONGROUP
public static final String ERR_UNRELATED_TYPES_IN_SUBSTITUTIONGROUP
WRN_IMPLICIT_URTYPE_FOR_ELEMENT
public static final String WRN_IMPLICIT_URTYPE_FOR_ELEMENT
WRN_OBSOLETED_NAMESPACE
public static final String WRN_OBSOLETED_NAMESPACE
WRN_UNSUPPORTED_ANYELEMENT
public static final String WRN_UNSUPPORTED_ANYELEMENT
XMLSchemaNamespace
public static final String XMLSchemaNamespace
namespace URI of XML Schema declarations.
XMLSchemaNamespace_old
public static final String XMLSchemaNamespace_old
XMLSchemaSchemaLocationAttributes
public static final String XMLSchemaSchemaLocationAttributes
complexUrType
public final ComplexTypeExp complexUrType
expression that matches to "ur-type" when used as a complex type.
doDuplicateDefinitionCheck
public boolean doDuplicateDefinitionCheck
a flag that indicates State objects should check duplicate definitions.
This flag is set to false when in <redefine>. Otherwise this flag is true.
parsedFiles
public final Map parsedFiles
tables that store all SystemIds that we've read.
map from target namespace URI to set of system ids.
This field is used to prevent double inclusion.
Strictly speaking, comparision based on system id is not enough.
The spec calls for "the necessity of establishing identity
component by component" (section 4.2.1, last note).
xsiSchemaLocationExp
public final ReferenceExp xsiSchemaLocationExp
content model that matches to
optional xsi:schemaLocation or xsi:noNamespaceSchemaLocation.
createAttributeState
public State createAttributeState(State parent,
StartTagInfo tag)
creates a state object that parses "attribute","attributeGroup ref", and "anyAttribute".
createModelGroupState
public State createModelGroupState(State parent,
StartTagInfo tag)
creates a state object that parses "all"/"group ref"/"choice" and "sequence".
getOrCreateSchema
public XMLSchemaSchema getOrCreateSchema(String namespaceURI)
gets a reference to XMLSchemaGrammar object whose target namespace
is the specified one.
If there is no such object, this method creates a new instance and
returns it.
getXmlSchemaForXmlSchema
public static Schema getXmlSchemaForXmlSchema()
isSchemaDefined
public final boolean isSchemaDefined(XMLSchemaSchema schema)
isSchemaNamespace
public boolean isSchemaNamespace(String ns)
markSchemaAsDefined
public final void markSchemaAsDefined(XMLSchemaSchema schema)
processOccurs
public Expression processOccurs(Expression item,
int minOccurs,
int maxOccurs)
Adds maxOccurs/minOccurs semantics to a given expression.
maxOccurs
- -1 to represent "unbounded".
processOccurs
public Expression processOccurs(StartTagInfo startTag,
Expression item)
Adds maxOccurs/minOccurs semantics to a given expression.
For example, if this method receives A, minOccurs=0, and maxOccurs=3,
then this method should return something like (A,(A,A?)?)?
resolveBuiltinDataType
public XSDatatype resolveBuiltinDataType(String typeLocalName)
resolves built-in datatypes (URI: http://www.w3.org/2001/XMLSchema)
- null if the type is not defined.
resolveBuiltinSimpleType
public SimpleTypeExp resolveBuiltinSimpleType(String typeLocalName)
Gets a built-in datatype as SimpleTypeExp.
- null if the type is not defined.
splitQName
public String[] splitQName(String qName)
Resolves a QName into a pair of (namespace URI,local name).
When we are parsing a "chameleon schema", any reference to
the default empty namespace("") has to be treated as a reference to
the intended target namespace.
- splitQName in interface GrammarReader