Home » Xerces-J-src.2.9.1 » org.apache.xerces » parsers » [javadoc | source]
org.apache.xerces.parsers
public class: XMLGrammarCachingConfiguration [javadoc | source]
java.lang.Object
   org.apache.xerces.util.ParserConfigurationSettings
      org.apache.xerces.parsers.XML11Configuration
         org.apache.xerces.parsers.XIncludeAwareParserConfiguration
            org.apache.xerces.parsers.XMLGrammarCachingConfiguration

All Implemented Interfaces:
    XMLPullParserConfiguration, XML11Configurable, XMLComponentManager

This configuration provides a generic way of using Xerces's grammar caching facilities. It extends the XIncludeAwareParserConfiguration and thus may validate documents according to XML schemas or DTD's. It also allows the user to preparse a grammar, and to lock the grammar pool implementation such that no more grammars will be added.

Using the org.apache.xerces.xni.parser property, an application may instantiate a Xerces SAX or DOM parser with this configuration. When invoked in this manner, the default behaviour will be elicited; to use this configuration's specific facilities, the user will need to reference it directly.

In addition to the features and properties recognized by the base parser configuration, this class recognizes these additional features and properties:

Field Summary
public static final  int BIG_PRIME     
protected static final  SynchronizedSymbolTable fStaticSymbolTable     
protected static final  XMLGrammarPoolImpl fStaticGrammarPool     
protected static final  String SCHEMA_FULL_CHECKING     
protected  XMLSchemaLoader fSchemaLoader     
protected  XMLDTDLoader fDTDLoader     
Fields inherited from org.apache.xerces.parsers.XIncludeAwareParserConfiguration:
ALLOW_UE_AND_NOTATION_EVENTS,  XINCLUDE_FIXUP_BASE_URIS,  XINCLUDE_FIXUP_LANGUAGE,  XINCLUDE_FEATURE,  XINCLUDE_HANDLER,  NAMESPACE_CONTEXT,  fXIncludeHandler,  fNonXIncludeNSContext,  fXIncludeNSContext,  fCurrentNSContext,  fXIncludeEnabled
Fields inherited from org.apache.xerces.parsers.XML11Configuration:
XML11_DATATYPE_VALIDATOR_FACTORY,  WARN_ON_DUPLICATE_ATTDEF,  WARN_ON_DUPLICATE_ENTITYDEF,  WARN_ON_UNDECLARED_ELEMDEF,  ALLOW_JAVA_ENCODINGS,  CONTINUE_AFTER_FATAL_ERROR,  LOAD_EXTERNAL_DTD,  NOTIFY_BUILTIN_REFS,  NOTIFY_CHAR_REFS,  NORMALIZE_DATA,  SCHEMA_ELEMENT_DEFAULT,  SCHEMA_AUGMENT_PSVI,  XMLSCHEMA_VALIDATION,  XMLSCHEMA_FULL_CHECKING,  GENERATE_SYNTHETIC_ANNOTATIONS,  VALIDATE_ANNOTATIONS,  HONOUR_ALL_SCHEMALOCATIONS,  USE_GRAMMAR_POOL_ONLY,  VALIDATION,  NAMESPACES,  EXTERNAL_GENERAL_ENTITIES,  EXTERNAL_PARAMETER_ENTITIES,  IGNORE_XSI_TYPE,  ID_IDREF_CHECKING,  UNPARSED_ENTITY_CHECKING,  IDENTITY_CONSTRAINT_CHECKING,  XML_STRING,  SYMBOL_TABLE,  ERROR_HANDLER,  ENTITY_RESOLVER,  SCHEMA_VALIDATOR,  SCHEMA_LOCATION,  SCHEMA_NONS_LOCATION,  ERROR_REPORTER,  ENTITY_MANAGER,  DOCUMENT_SCANNER,  DTD_SCANNER,  XMLGRAMMAR_POOL,  DTD_PROCESSOR,  DTD_VALIDATOR,  NAMESPACE_BINDER,  DATATYPE_VALIDATOR_FACTORY,  VALIDATION_MANAGER,  JAXP_SCHEMA_LANGUAGE,  JAXP_SCHEMA_SOURCE,  ROOT_TYPE_DEF,  PRINT_EXCEPTION_STACK_TRACE,  fSymbolTable,  fInputSource,  fValidationManager,  fVersionDetector,  fLocator,  fLocale,  fComponents,  fXML11Components,  fCommonComponents,  fDocumentHandler,  fDTDHandler,  fDTDContentModelHandler,  fLastComponent,  fParseInProgress,  fConfigUpdated,  fDatatypeValidatorFactory,  fNamespaceScanner,  fNonNSScanner,  fDTDValidator,  fNonNSDTDValidator,  fDTDScanner,  fDTDProcessor,  fXML11DatatypeFactory,  fXML11NSDocScanner,  fXML11DocScanner,  fXML11NSDTDValidator,  fXML11DTDValidator,  fXML11DTDScanner,  fXML11DTDProcessor,  fGrammarPool,  fErrorReporter,  fEntityManager,  fSchemaValidator,  fCurrentScanner,  fCurrentDVFactory,  fCurrentDTDScanner
Fields inherited from org.apache.xerces.util.ParserConfigurationSettings:
PARSER_SETTINGS,  fRecognizedProperties,  fProperties,  fRecognizedFeatures,  fFeatures,  fParentSettings
Constructor:
 public XMLGrammarCachingConfiguration() 
 public XMLGrammarCachingConfiguration(SymbolTable symbolTable) 
    Constructs a parser configuration using the specified symbol table.
    Parameters:
    symbolTable - The symbol table to use.
 public XMLGrammarCachingConfiguration(SymbolTable symbolTable,
    XMLGrammarPool grammarPool) 
    Constructs a parser configuration using the specified symbol table and grammar pool.

    REVISIT: Grammar pool will be updated when the new validation engine is implemented.

    Parameters:
    symbolTable - The symbol table to use.
    grammarPool - The grammar pool to use.
 public XMLGrammarCachingConfiguration(SymbolTable symbolTable,
    XMLGrammarPool grammarPool,
    XMLComponentManager parentSettings) 
    Constructs a parser configuration using the specified symbol table, grammar pool, and parent settings.

    REVISIT: Grammar pool will be updated when the new validation engine is implemented.

    Parameters:
    symbolTable - The symbol table to use.
    grammarPool - The grammar pool to use.
    parentSettings - The parent settings.
Method from org.apache.xerces.parsers.XMLGrammarCachingConfiguration Summary:
checkFeature,   checkProperty,   clearGrammarPool,   lockGrammarPool,   parseDTD,   parseGrammar,   parseGrammar,   parseXMLSchema,   unlockGrammarPool
Methods from org.apache.xerces.parsers.XIncludeAwareParserConfiguration:
configurePipeline,   configureXML11Pipeline,   getFeature,   setFeature
Methods from org.apache.xerces.parsers.XML11Configuration:
addCommonComponent,   addComponent,   addRecognizedParamsAndSetDefaults,   addXML11Component,   checkFeature,   checkProperty,   cleanup,   configurePipeline,   configureXML11Pipeline,   getDTDContentModelHandler,   getDTDHandler,   getDocumentHandler,   getEntityResolver,   getErrorHandler,   getFeature,   getFeature0,   getLocale,   parse,   parse,   reset,   resetCommon,   resetXML11,   setDTDContentModelHandler,   setDTDHandler,   setDocumentHandler,   setEntityResolver,   setErrorHandler,   setFeature,   setInputSource,   setLocale,   setProperty
Methods from org.apache.xerces.util.ParserConfigurationSettings:
addRecognizedFeatures,   addRecognizedProperties,   checkFeature,   checkProperty,   getFeature,   getProperty,   setFeature,   setProperty
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.xerces.parsers.XMLGrammarCachingConfiguration Detail:
 protected  void checkFeature(String featureId) throws XMLConfigurationException 
    Check a feature. If feature is known and supported, this method simply returns. Otherwise, the appropriate exception is thrown.
 protected  void checkProperty(String propertyId) throws XMLConfigurationException 
    Check a property. If the property is known and supported, this method simply returns. Otherwise, the appropriate exception is thrown.
 public  void clearGrammarPool() 
 public  void lockGrammarPool() 
 DTDGrammar parseDTD(XMLInputSource is) throws IOException 
 public Grammar parseGrammar(String type,
    String uri) throws IOException, XNIException 
    Parse a grammar from a location identified by an URI. This method also adds this grammar to the XMLGrammarPool
 public Grammar parseGrammar(String type,
    XMLInputSource is) throws IOException, XNIException 
    Parse a grammar from a location identified by an XMLInputSource. This method also adds this grammar to the XMLGrammarPool
 SchemaGrammar parseXMLSchema(XMLInputSource is) throws IOException 
 public  void unlockGrammarPool()