Class XSDHandler
java.lang.Object
org.apache.xerces.impl.xs.traversers.XSDHandler
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.
INTERNAL:
- Usage of this class is not supported. It may be altered or removed at any time.
- Version:
- $Id: XSDHandler.java 1868534 2019-10-17 05:36:40Z mukulg $
- Author:
- Neil Graham, IBM, Pavani Mukthipudi, Sun Microsystems
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final StringFeature identifier: allow java encodingsprotected static final StringFeature identifier: continue after fatal errorprotected static final booleanprotected static final StringFeature: disallow doctypeprotected static final StringProperty identifier: entity manager.static final StringProperty identifier: entity resolver.protected static final StringProperty identifier: error handler.static final StringProperty identifier: error reporter.protected XSDeclarationPoolprotected Hashtableprotected static final StringFeature: generate synthetic annotationsprotected static final StringFeature identifier: honour all schemaLocationsprotected static final StringProperty identifier: JAXP schema source.protected static final StringProperty identifier: locale.protected static final StringFeature identifier: namespace growthstatic final Stringprotected static final StringProperty identifier: security manager.protected static final StringFeature identifier: allow java encodingsprotected static final StringFeature identifier: string interning.static final StringProperty identifier: symbol table.protected static final StringFeature identifier: tolerate duplicatesprotected static final StringFeature identifier: validate annotations.protected static final StringFeature identifier: validation.static final StringProperty identifier: grammar pool.protected static final Stringfeature identifier: XML Schema validation -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected org.apache.xerces.impl.xs.traversers.XSDocumentInfoconstructTrees(Element schemaRoot, String locationHint, XSDDescription desc, boolean nsCollision) Extract location information from an Element node, and create a new SimpleLocator object from such information.booleanExtract location information from an Element node, store such information in the passed-in SimpleLocator object, then return true.protected SchemaGrammarfindGrammar(XSDDescription desc, boolean ignoreConflict) First try to find a grammar in the bucket, if failed, consult the grammar pool.protected ObjectgetGlobalDecl(String declKey, int declType) protected ObjectgetGlobalDecl(org.apache.xerces.impl.xs.traversers.XSDocumentInfo currSchema, int declType, org.apache.xerces.xni.QName declToTraverse, Element elmNode) protected ObjectgetGlobalDeclFromGrammar(SchemaGrammar sGrammar, int declType, String localpart) protected ObjectgetGlobalDeclFromGrammar(SchemaGrammar sGrammar, int declType, String localpart, String schemaLoc) protected Hashtableprotected HashtableparseSchema(org.apache.xerces.xni.parser.XMLInputSource is, XSDDescription desc, Hashtable locationPairs) This method initiates the parse of a schema.voidreset(org.apache.xerces.xni.parser.XMLComponentManager componentManager) protected voidschemaDocument2SystemId(org.apache.xerces.impl.xs.traversers.XSDocumentInfo schemaDoc) voidsetDeclPool(XSDeclarationPool declPool) voidsetDVFactory(SchemaDVFactory dvFactory) voidsetGenerateSyntheticAnnotations(boolean state) protected voidstoreKeyRef(Element keyrefToStore, org.apache.xerces.impl.xs.traversers.XSDocumentInfo schemaDoc, XSElementDecl currElemDecl) protected ObjecttraverseGlobalDecl(int declType, Element decl, org.apache.xerces.impl.xs.traversers.XSDocumentInfo schemaDoc, SchemaGrammar grammar) protected voidtraverseSchemas(ArrayList annotationInfo)
-
Field Details
-
VALIDATION
Feature identifier: validation.- See Also:
-
XMLSCHEMA_VALIDATION
feature identifier: XML Schema validation- See Also:
-
ALLOW_JAVA_ENCODINGS
Feature identifier: allow java encodings- See Also:
-
CONTINUE_AFTER_FATAL_ERROR
Feature identifier: continue after fatal error- See Also:
-
STANDARD_URI_CONFORMANT_FEATURE
Feature identifier: allow java encodings- See Also:
-
DISALLOW_DOCTYPE
Feature: disallow doctype- See Also:
-
GENERATE_SYNTHETIC_ANNOTATIONS
Feature: generate synthetic annotations- See Also:
-
VALIDATE_ANNOTATIONS
Feature identifier: validate annotations.- See Also:
-
HONOUR_ALL_SCHEMALOCATIONS
Feature identifier: honour all schemaLocations- See Also:
-
NAMESPACE_GROWTH
Feature identifier: namespace growth- See Also:
-
TOLERATE_DUPLICATES
Feature identifier: tolerate duplicates- See Also:
-
STRING_INTERNING
Feature identifier: string interning.- See Also:
-
ERROR_HANDLER
Property identifier: error handler.- See Also:
-
JAXP_SCHEMA_SOURCE
Property identifier: JAXP schema source.- See Also:
-
ENTITY_RESOLVER
Property identifier: entity resolver.- See Also:
-
ENTITY_MANAGER
Property identifier: entity manager.- See Also:
-
ERROR_REPORTER
Property identifier: error reporter.- See Also:
-
XMLGRAMMAR_POOL
Property identifier: grammar pool.- See Also:
-
SYMBOL_TABLE
Property identifier: symbol table.- See Also:
-
SECURITY_MANAGER
Property identifier: security manager.- See Also:
-
LOCALE
Property identifier: locale.- See Also:
-
DEBUG_NODE_POOL
protected static final boolean DEBUG_NODE_POOL- See Also:
-
REDEF_IDENTIFIER
- See Also:
-
fNotationRegistry
-
fDeclPool
-
-
Constructor Details
-
XSDHandler
public XSDHandler() -
XSDHandler
-
-
Method Details
-
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.- Parameters:
is-desc-locationPairs-- Returns:
- the SchemaGrammar
- Throws:
IOException
-
findGrammar
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. -
constructTrees
protected org.apache.xerces.impl.xs.traversers.XSDocumentInfo constructTrees(Element schemaRoot, String locationHint, XSDDescription desc, boolean nsCollision) -
buildGlobalNameRegistries
protected void buildGlobalNameRegistries() -
traverseSchemas
-
getGlobalDecl
-
getGlobalDecl
-
getGlobalDeclFromGrammar
-
getGlobalDeclFromGrammar
protected Object getGlobalDeclFromGrammar(SchemaGrammar sGrammar, int declType, String localpart, String schemaLoc) -
traverseGlobalDecl
protected Object traverseGlobalDecl(int declType, Element decl, org.apache.xerces.impl.xs.traversers.XSDocumentInfo schemaDoc, SchemaGrammar grammar) -
schemaDocument2SystemId
public String schemaDocument2SystemId(org.apache.xerces.impl.xs.traversers.XSDocumentInfo schemaDoc) -
resolveKeyRefs
protected void resolveKeyRefs() -
getIDRegistry
-
getIDRegistry_sub
-
storeKeyRef
protected void storeKeyRef(Element keyrefToStore, org.apache.xerces.impl.xs.traversers.XSDocumentInfo schemaDoc, XSElementDecl currElemDecl) -
setDeclPool
-
setDVFactory
-
reset
public void reset(org.apache.xerces.xni.parser.XMLComponentManager componentManager) -
element2Locator
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
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. -
setGenerateSyntheticAnnotations
public void setGenerateSyntheticAnnotations(boolean state) - Parameters:
state-
-