| java.lang.Object org.apache.xerces.validators.datatype.DatatypeValidatorFactoryImpl
DatatypeValidatorFactoryImpl | public class DatatypeValidatorFactoryImpl implements DatatypeValidatorFactory(Code) | | This class implements a factory of datatype validators. Internally the
DatatypeValidators are kept in three registries:
(i) DTDRegistry - stores DTD datatype validators
SchemaRegistry - stores Schema datatype validators
UserDefinedRegistry - stores Schema user defined datatypes.
The above registries will be initialized on demand (for XML document with a DTD, only
DTDRegistry will be initialized).
Note: Between multiple parse() calls, only _user_defined_ registry will be reset.
DTD registry and schema registry are initialized only once and are kept for the *life-time* of the parser .
This implementation uses a Hahtable as a registry table but future implementation
should use a lighter object, maybe a Map class ( not use a derived Map class
because of JDK 1.1.8 no supporting Map).
As the Parser parses an instance document it knows if validation needs
to be checked. If no validation is necessary we should not instantiate a
DatatypeValidatorFactoryImpl.
author: Elena Litani author: Jeffrey Rodriguez author: Mark Swinkles - List Validation refactoring version: $Id: DatatypeValidatorFactoryImpl.java,v 1.33 2001/08/01 12:46:57 sandygao Exp $ |
DatatypeValidatorFactoryImpl | public DatatypeValidatorFactoryImpl()(Code) | | |
expandRegistryToFullSchemaSet | public void expandRegistryToFullSchemaSet()(Code) | | Initializes fSchemaDatatypeRegistry with schema primitive and derived datatypes.
See W3C Schema Datatype REC.
If DTD registry is not initialized yet, this method will initialize it as well.
|
getDatatypeValidator | public DatatypeValidator getDatatypeValidator(String type)(Code) | | Searches different datatype registries depending on validation mode (schema or dtd)
Parameters: type - |
initializeDTDRegistry | public void initializeDTDRegistry()(Code) | | Initializes fDTDRegistry with (9) DTD related datatypes .
|
resetRegistry | public void resetRegistry()(Code) | | An optimization option that we should write in the future is to separate the static list
of Datatype Validators from the dynamic part where anonymous, and user derived datatype are
kept, then when we resetRegistry only the dynamic part of the registry should be cleared.
So we don't end up clearing the static part of the table over and over every time that we
do a parse cycle.
|
|
|