Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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:
  $Id: XSDHandler.java,v 1.62 2003/01/21 19:14:05 sandygao Exp $
Author:
  Neil Graham, IBM, Pavani Mukthipudi, Sun Microsystems

Field Summary
`protected static java.lang.String` | `ALLOW_JAVA_ENCODINGS` Feature identifier: allow java encodings
`protected static java.lang.String` | `CONTINUE_AFTER_FATAL_ERROR` Feature identifier: continue after fatal error
`protected static boolean` | `DEBUG_NODE_POOL`
`static java.lang.String` | `ENTITY_RESOLVER` Property identifier: entity resolver.
`protected static java.lang.String` | `ERROR_HANDLER` Property identifier: error handler.
`protected XSDeclarationPool` | `fDeclPool`
`protected java.util.Hashtable` | `fNotationRegistry`
`protected static java.lang.String` | `JAXP_SCHEMA_SOURCE` Property identifier: JAXP schema source.
`static java.lang.String` | `REDEF_IDENTIFIER`
`protected static java.lang.String` | `STANDARD_URI_CONFORMANT_FEATURE` Feature identifier: allow java encodings

Constructor Summary
`XSDHandler(XSGrammarBucket gBucket)`

Method Summary
`protected void` | `buildGlobalNameRegistries()`
`protected org.apache.xerces.impl.xs.traversers.XSDocumentInfo` | `constructTrees(org.w3c.dom.Document schemaRoot, java.lang.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 java.lang.Object` | `getGlobalDecl(org.apache.xerces.impl.xs.traversers.XSDocumentInfo currSchema, int declType, org.apache.xerces.xni.QName declToTraverse, org.w3c.dom.Element elmNode)`
`protected java.util.Hashtable` | `getIDRegistry()`
`SchemaGrammar` | `parseSchema(org.apache.xerces.xni.parser.XMLInputSource is, XSDDescription desc, java.util.Hashtable locationPairs)`
`void` | `reset(XMLErrorReporter errorReporter, org.apache.xerces.xni.parser.XMLEntityResolver entityResolver, SymbolTable symbolTable, org.apache.xerces.xni.grammars.XMLGrammarPool grammarPool, boolean allowJavaEncodings, boolean strictURI)`
`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()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### ALLOW_JAVA_ENCODINGS

    protected static final java.lang.String ALLOW_JAVA_ENCODINGS

  Feature identifier: allow java encodings

### CONTINUE_AFTER_FATAL_ERROR

    protected static final java.lang.String CONTINUE_AFTER_FATAL_ERROR

  Feature identifier: continue after fatal error

### STANDARD_URI_CONFORMANT_FEATURE

    protected static final java.lang.String STANDARD_URI_CONFORMANT_FEATURE

  Feature identifier: allow java encodings

### ERROR_HANDLER

    protected static final java.lang.String ERROR_HANDLER

  Property identifier: error handler.

### JAXP_SCHEMA_SOURCE

    protected static final java.lang.String JAXP_SCHEMA_SOURCE

  Property identifier: JAXP schema source.

### ENTITY_RESOLVER

    public static final java.lang.String ENTITY_RESOLVER

  Property identifier: entity resolver.

### DEBUG_NODE_POOL

    protected static final boolean DEBUG_NODE_POOL

### REDEF_IDENTIFIER

    public static final java.lang.String REDEF_IDENTIFIER

### fNotationRegistry

    protected java.util.Hashtable fNotationRegistry

### fDeclPool

    protected XSDeclarationPool fDeclPool

Constructor Detail

### XSDHandler

    public XSDHandler(XSGrammarBucket gBucket)

Method Detail

### parseSchema

    public SchemaGrammar parseSchema(org.apache.xerces.xni.parser.XMLInputSource is,
                                     XSDDescription desc,
                                     java.util.Hashtable locationPairs)
                              throws java.io.IOException

### 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.

### constructTrees

    protected org.apache.xerces.impl.xs.traversers.XSDocumentInfo constructTrees(org.w3c.dom.Document schemaRoot,
                                                                                 java.lang.String locationHint,
                                                                                 XSDDescription desc)

### buildGlobalNameRegistries

    protected void buildGlobalNameRegistries()

### traverseSchemas

    protected void traverseSchemas()

### getGlobalDecl

    protected java.lang.Object getGlobalDecl(org.apache.xerces.impl.xs.traversers.XSDocumentInfo currSchema,
                                             int declType,
                                             org.apache.xerces.xni.QName declToTraverse,
                                             org.w3c.dom.Element elmNode)

### resolveKeyRefs

    protected void resolveKeyRefs()

### getIDRegistry

    protected java.util.Hashtable getIDRegistry()

### storeKeyRef

    protected void storeKeyRef(org.w3c.dom.Element keyrefToStore,
                               org.apache.xerces.impl.xs.traversers.XSDocumentInfo schemaDoc,
                               XSElementDecl currElemDecl)

### setDeclPool

    public void setDeclPool(XSDeclarationPool declPool)

### reset

    public void reset(XMLErrorReporter errorReporter,
                      org.apache.xerces.xni.parser.XMLEntityResolver entityResolver,
                      SymbolTable symbolTable,
                      org.apache.xerces.xni.grammars.XMLGrammarPool grammarPool,
                      boolean allowJavaEncodings,
                      boolean strictURI)

### 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.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1999-2003 Apache XML Project. All Rights Reserved.