org.apache.xerces.impl.xs.traversers
Class XSDHandler
java.lang.Object
org.apache.xerces.impl.xs.traversers.XSDHandler
public class XSDHandler
extends java.lang.Object
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.
Version:
- Neil Graham, IBM
- Pavani Mukthipudi, Sun Microsystems
protected void | buildGlobalNameRegistries()
|
protected org.apache.xerces.impl.xs.traversers.XSDocumentInfo | constructTrees(org.w3c.dom.Document schemaRoot, String locationHint, XSDDescription desc)
|
SimpleLocator | element2Locator(org.w3c.dom.Element e) - Extract location information from an Element node, and create a
new SimpleLocator object from such information.
|
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.
|
protected SchemaGrammar | findGrammar(XSDDescription desc) - First try to find a grammar in the bucket, if failed, consult the
grammar pool.
|
protected Object | getGlobalDecl(org.apache.xerces.impl.xs.traversers.XSDocumentInfo currSchema, int declType, org.apache.xerces.xni.QName declToTraverse, org.w3c.dom.Element elmNode)
|
protected Hashtable | getIDRegistry()
|
SchemaGrammar | parseSchema(org.apache.xerces.xni.parser.XMLInputSource is, XSDDescription desc, Hashtable locationPairs) - This method initiates the parse of a schema.
|
void | reset(org.apache.xerces.xni.parser.XMLComponentManager componentManager)
|
protected void | resolveKeyRefs()
|
void | setDeclPool(XSDeclarationPool declPool)
|
protected void | storeKeyRef(org.w3c.dom.Element keyrefToStore, org.apache.xerces.impl.xs.traversers.XSDocumentInfo schemaDoc, XSElementDecl currElemDecl)
|
protected void | traverseSchemas()
|
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
- false
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.
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
STANDARD_URI_CONFORMANT_FEATURE
protected static final String STANDARD_URI_CONFORMANT_FEATURE
Feature identifier: allow java encodings
SYMBOL_TABLE
public static final String SYMBOL_TABLE
Property identifier: symbol table.
XMLGRAMMAR_POOL
public static final String XMLGRAMMAR_POOL
Property identifier: grammar pool.
fNotationRegistry
protected Hashtable fNotationRegistry
XSDHandler
public XSDHandler()
buildGlobalNameRegistries
protected void buildGlobalNameRegistries()
constructTrees
protected org.apache.xerces.impl.xs.traversers.XSDocumentInfo constructTrees(org.w3c.dom.Document 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()
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()
storeKeyRef
protected void storeKeyRef(org.w3c.dom.Element keyrefToStore,
org.apache.xerces.impl.xs.traversers.XSDocumentInfo schemaDoc,
XSElementDecl currElemDecl)
traverseSchemas
protected void traverseSchemas()
Copyright B) 1999-2004 Apache XML Project. All Rights Reserved.