org.apache.xerces.impl.xs.traversers
Class XSDHandler

java.lang.Object
  extended by 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 449487 2006-09-24 21:11:28Z mrglavas $
Author:
Neil Graham, IBM, Pavani Mukthipudi, Sun Microsystems

Field Summary
static java.lang.String ENTITY_RESOLVER
          Property identifier: entity resolver.
static java.lang.String ERROR_REPORTER
          Property identifier: error reporter.
static java.lang.String REDEF_IDENTIFIER
           
static java.lang.String SYMBOL_TABLE
          Property identifier: symbol table.
static java.lang.String XMLGRAMMAR_POOL
          Property identifier: grammar pool.
 
Constructor Summary
XSDHandler()
           
XSDHandler(XSGrammarBucket gBucket)
           
 
Method Summary
 SimpleLocator element2Locator(Element e)
          Extract location information from an Element node, and create a new SimpleLocator object from such information.
 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.
 SchemaGrammar parseSchema(XMLInputSource is, XSDDescription desc, java.util.Hashtable locationPairs)
          This method initiates the parse of a schema.
 void reset(XMLComponentManager componentManager)
           
 void setDeclPool(XSDeclarationPool declPool)
           
 void setGenerateSyntheticAnnotations(boolean state)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ENTITY_RESOLVER

public static final java.lang.String ENTITY_RESOLVER
Property identifier: entity resolver.

See Also:
Constant Field Values

ERROR_REPORTER

public static final java.lang.String ERROR_REPORTER
Property identifier: error reporter.

See Also:
Constant Field Values

XMLGRAMMAR_POOL

public static final java.lang.String XMLGRAMMAR_POOL
Property identifier: grammar pool.

See Also:
Constant Field Values

SYMBOL_TABLE

public static final java.lang.String SYMBOL_TABLE
Property identifier: symbol table.

See Also:
Constant Field Values

REDEF_IDENTIFIER

public static final java.lang.String REDEF_IDENTIFIER
See Also:
Constant Field Values
Constructor Detail

XSDHandler

public XSDHandler()

XSDHandler

public XSDHandler(XSGrammarBucket gBucket)
Method Detail

parseSchema

public SchemaGrammar parseSchema(XMLInputSource is,
                                 XSDDescription desc,
                                 java.util.Hashtable locationPairs)
                          throws java.io.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:
java.io.IOException

setDeclPool

public void setDeclPool(XSDeclarationPool declPool)

reset

public void reset(XMLComponentManager componentManager)

element2Locator

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.


element2Locator

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.


setGenerateSyntheticAnnotations

public void setGenerateSyntheticAnnotations(boolean state)
Parameters:
state -