The purpose of this class is to co-ordinate the construction of a
grammar object corresponding to a schema. To do this, it must be
prepared to parse several schema documents (for instance if the
schema document originally referred to contains or
information items). If any of the schemas imports a
schema, other grammars may be constructed as a side-effect.
ALLOW_JAVA_ENCODINGS
protected static final String ALLOW_JAVA_ENCODINGS
Feature identifier: allow java encodings
CONTINUE_AFTER_FATAL_ERROR
protected static final String CONTINUE_AFTER_FATAL_ERROR
Feature identifier: continue after fatal error
DEBUG_NODE_POOL
protected static final boolean DEBUG_NODE_POOL
DISALLOW_DOCTYPE
protected static final String DISALLOW_DOCTYPE
Feature: disallow doctype
ENTITY_MANAGER
protected static final String ENTITY_MANAGER
Property identifier: entity manager.
ENTITY_RESOLVER
public static final String ENTITY_RESOLVER
Property identifier: entity resolver.
ERROR_HANDLER
protected static final String ERROR_HANDLER
Property identifier: error handler.
ERROR_REPORTER
public static final String ERROR_REPORTER
Property identifier: error reporter.
GENERATE_SYNTHETIC_ANNOTATIONS
protected static final String GENERATE_SYNTHETIC_ANNOTATIONS
Feature: generate synthetic annotations
HONOUR_ALL_SCHEMALOCATIONS
protected static final String HONOUR_ALL_SCHEMALOCATIONS
Feature identifier: honour all schemaLocations
JAXP_SCHEMA_SOURCE
protected static final String JAXP_SCHEMA_SOURCE
Property identifier: JAXP schema source.
REDEF_IDENTIFIER
public static final String REDEF_IDENTIFIER
SECURITY_MANAGER
protected static final String SECURITY_MANAGER
Property identifier: security manager.
STANDARD_URI_CONFORMANT_FEATURE
protected static final String STANDARD_URI_CONFORMANT_FEATURE
Feature identifier: allow java encodings
STRING_INTERNING
protected static final String STRING_INTERNING
Feature identifier: string interning.
SYMBOL_TABLE
public static final String SYMBOL_TABLE
Property identifier: symbol table.
VALIDATE_ANNOTATIONS
protected static final String VALIDATE_ANNOTATIONS
Feature identifier: validate annotations.
VALIDATION
protected static final String VALIDATION
Feature identifier: validation.
XMLGRAMMAR_POOL
public static final String XMLGRAMMAR_POOL
Property identifier: grammar pool.
XMLSCHEMA_VALIDATION
protected static final String XMLSCHEMA_VALIDATION
feature identifier: XML Schema validation
fNotationRegistry
protected Hashtable fNotationRegistry
buildGlobalNameRegistries
protected void buildGlobalNameRegistries()
constructTrees
protected org.apache.xerces.impl.xs.traversers.XSDocumentInfo constructTrees(org.w3c.dom.Element schemaRoot,
String locationHint,
XSDDescription desc)
element2Locator
public SimpleLocator element2Locator(org.w3c.dom.Element e)
Extract location information from an Element node, and create a
new SimpleLocator object from such information. Returning null means
no information can be retrieved from the element.
element2Locator
public boolean element2Locator(org.w3c.dom.Element e,
SimpleLocator l)
Extract location information from an Element node, store such
information in the passed-in SimpleLocator object, then return
true. Returning false means can't extract or store such information.
findGrammar
protected SchemaGrammar findGrammar(XSDDescription desc)
First try to find a grammar in the bucket, if failed, consult the
grammar pool. If a grammar is found in the pool, then add it (and all
imported ones) into the bucket.
getGlobalDecl
protected Object getGlobalDecl(org.apache.xerces.impl.xs.traversers.XSDocumentInfo currSchema,
int declType,
org.apache.xerces.xni.QName declToTraverse,
org.w3c.dom.Element elmNode)
getIDRegistry
protected Hashtable getIDRegistry()
getIDRegistry_sub
protected Hashtable getIDRegistry_sub()
parseSchema
public SchemaGrammar parseSchema(org.apache.xerces.xni.parser.XMLInputSource is,
XSDDescription desc,
Hashtable locationPairs)
throws IOException
This method initiates the parse of a schema. It will likely be
called from the Validator and it will make the
resulting grammar available; it returns a reference to this object just
in case. A reset(XMLComponentManager) must be called before this methods is called.
is
- desc
- locationPairs
-
reset
public void reset(org.apache.xerces.xni.parser.XMLComponentManager componentManager)
resolveKeyRefs
protected void resolveKeyRefs()
setGenerateSyntheticAnnotations
public void setGenerateSyntheticAnnotations(boolean state)
storeKeyRef
protected void storeKeyRef(org.w3c.dom.Element keyrefToStore,
org.apache.xerces.impl.xs.traversers.XSDocumentInfo schemaDoc,
XSElementDecl currElemDecl)
traverseSchemas
protected void traverseSchemas(ArrayList annotationInfo)