Save This Page
Home » Xerces-J-src.2.9.1 » org.apache.xerces » impl » xs » traversers » [javadoc | source]
org.apache.xerces.impl.xs.traversers
public class: XSDHandler [javadoc | source]
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.
    xerces.internal:
    author: Neil - Graham, IBM
    author: Pavani - Mukthipudi, Sun Microsystems
    version: $ - Id: XSDHandler.java 449487 2006-09-24 21:11:28Z mrglavas $
Field Summary
protected static final  String VALIDATION    Feature identifier: validation. 
protected static final  String XMLSCHEMA_VALIDATION    feature identifier: XML Schema validation 
protected static final  String ALLOW_JAVA_ENCODINGS    Feature identifier: allow java encodings 
protected static final  String CONTINUE_AFTER_FATAL_ERROR    Feature identifier: continue after fatal error 
protected static final  String STANDARD_URI_CONFORMANT_FEATURE    Feature identifier: allow java encodings 
protected static final  String DISALLOW_DOCTYPE    Feature: disallow doctype 
protected static final  String GENERATE_SYNTHETIC_ANNOTATIONS    Feature: generate synthetic annotations 
protected static final  String VALIDATE_ANNOTATIONS    Feature identifier: validate annotations. 
protected static final  String HONOUR_ALL_SCHEMALOCATIONS    Feature identifier: honour all schemaLocations 
protected static final  String STRING_INTERNING    Feature identifier: string interning. 
protected static final  String ERROR_HANDLER    Property identifier: error handler. 
protected static final  String JAXP_SCHEMA_SOURCE    Property identifier: JAXP schema source. 
public static final  String ENTITY_RESOLVER    Property identifier: entity resolver. 
protected static final  String ENTITY_MANAGER    Property identifier: entity manager. 
public static final  String ERROR_REPORTER    Property identifier: error reporter. 
public static final  String XMLGRAMMAR_POOL    Property identifier: grammar pool. 
public static final  String SYMBOL_TABLE    Property identifier: symbol table. 
protected static final  String SECURITY_MANAGER    Property identifier: security manager. 
protected static final  boolean DEBUG_NODE_POOL     
static final  int ATTRIBUTE_TYPE     
static final  int ATTRIBUTEGROUP_TYPE     
static final  int ELEMENT_TYPE     
static final  int GROUP_TYPE     
static final  int IDENTITYCONSTRAINT_TYPE     
static final  int NOTATION_TYPE     
static final  int TYPEDECL_TYPE     
public static final  String REDEF_IDENTIFIER     
protected  Hashtable fNotationRegistry     
protected  XSDeclarationPool fDeclPool     
 Hashtable fHiddenNodes     
 XSDAttributeGroupTraverser fAttributeGroupTraverser     
 XSDAttributeTraverser fAttributeTraverser     
 XSDComplexTypeTraverser fComplexTypeTraverser     
 XSDElementTraverser fElementTraverser     
 XSDGroupTraverser fGroupTraverser     
 XSDKeyrefTraverser fKeyrefTraverser     
 XSDNotationTraverser fNotationTraverser     
 XSDSimpleTypeTraverser fSimpleTypeTraverser     
 XSDUniqueOrKeyTraverser fUniqueOrKeyTraverser     
 XSDWildcardTraverser fWildCardTraverser     
 SchemaDOMParser fSchemaParser     
 SchemaContentHandler fXSContentHandler     
 XML11Configuration fAnnotationValidator     
 XSDHandler.XSAnnotationGrammarPool fGrammarBucketAdapter     
Constructor:
 public XSDHandler() 
 public XSDHandler(XSGrammarBucket gBucket) 
Method from org.apache.xerces.impl.xs.traversers.XSDHandler Summary:
buildGlobalNameRegistries,   checkForDuplicateNames,   constructTrees,   element2Locator,   element2Locator,   fillInLocalElemInfo,   findGrammar,   getGlobalDecl,   getGrammar,   getGrpOrAttrGrpRedefinedByRestriction,   getIDRegistry,   getIDRegistry_sub,   parseSchema,   prepareForParse,   prepareForTraverse,   reportSchemaError,   reportSchemaWarning,   reset,   resolveKeyRefs,   setDeclPool,   setGenerateSyntheticAnnotations,   storeKeyRef,   traverseLocalElements,   traverseSchemas
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.xerces.impl.xs.traversers.XSDHandler Detail:
 protected  void buildGlobalNameRegistries() 
  void checkForDuplicateNames(String qName,
    Hashtable registry,
    Hashtable registry_sub,
    Element currComp,
    XSDocumentInfo currSchema) 
    This method makes sure that if this component is being redefined that it lives in the right schema. It then renames the component correctly. If it detects a collision--a duplicate definition--then it complains. Note that redefines must be handled carefully: if there is a collision, it may be because we're redefining something we know about or because we've found the thing we're redefining.
 protected XSDocumentInfo constructTrees(Element schemaRoot,
    String locationHint,
    XSDDescription desc) 
 public SimpleLocator element2Locator(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.
 public boolean element2Locator(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.
  void fillInLocalElemInfo(Element elmDecl,
    XSDocumentInfo schemaDoc,
    int allContextFlags,
    XSObject parent,
    XSParticleDecl particle) 
 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.
 protected Object getGlobalDecl(XSDocumentInfo currSchema,
    int declType,
    QName declToTraverse,
    Element elmNode) 
 SchemaGrammar getGrammar(String tns) 
    Pull the grammar out of the bucket simply using its TNS as a key
 Object getGrpOrAttrGrpRedefinedByRestriction(int type,
    QName name,
    XSDocumentInfo currSchema,
    Element elmNode) 
 protected Hashtable getIDRegistry() 
 protected Hashtable getIDRegistry_sub() 
 public SchemaGrammar parseSchema(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.
  void prepareForParse() 
  void prepareForTraverse() 
  void reportSchemaError(String key,
    Object[] args,
    Element ele) 
  void reportSchemaWarning(String key,
    Object[] args,
    Element ele) 
 public  void reset(XMLComponentManager componentManager) 
 protected  void resolveKeyRefs() 
 public  void setDeclPool(XSDeclarationPool declPool) 
 public  void setGenerateSyntheticAnnotations(boolean state) 
 protected  void storeKeyRef(Element keyrefToStore,
    XSDocumentInfo schemaDoc,
    XSElementDecl currElemDecl) 
  void traverseLocalElements() 
    Traverse all the deferred local elements. This method should be called by traverseSchemas after we've done with all the global declarations.
 protected  void traverseSchemas(ArrayList annotationInfo)