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

All Implemented Interfaces:
    XMLPullParserConfiguration, XMLParserConfiguration, XMLComponentManager

Direct Known Subclasses:
    StandardParserConfiguration, NonValidatingParserConfiguration, IntegratedParserConfiguration

This is the DTD-only parser configuration. It extends the basic configuration with a standard set of parser components appropriate to DTD-centric validation. Since the Xerces2 reference implementation document and DTD scanner implementations are capable of acting as pull parsers, this configuration implements the XMLPullParserConfiguration interface.

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

Field Summary
protected static final  String WARN_ON_DUPLICATE_ATTDEF    Feature identifier: warn on duplicate attribute definition. 
protected static final  String WARN_ON_DUPLICATE_ENTITYDEF    Feature identifier: warn on duplicate entity definition. 
protected static final  String WARN_ON_UNDECLARED_ELEMDEF    Feature identifier: warn on undeclared element definition. 
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 LOAD_EXTERNAL_DTD    Feature identifier: load external DTD. 
protected static final  String NOTIFY_BUILTIN_REFS    Feature identifier: notify built-in refereces. 
protected static final  String NOTIFY_CHAR_REFS    Feature identifier: notify character refereces. 
protected static final  String ERROR_REPORTER    Property identifier: error reporter. 
protected static final  String ENTITY_MANAGER    Property identifier: entity manager. 
protected static final  String DOCUMENT_SCANNER    Property identifier document scanner: 
protected static final  String DTD_SCANNER    Property identifier: DTD scanner. 
protected static final  String XMLGRAMMAR_POOL    Property identifier: grammar pool. 
protected static final  String DTD_PROCESSOR    Property identifier: DTD loader. 
protected static final  String DTD_VALIDATOR    Property identifier: DTD validator. 
protected static final  String NAMESPACE_BINDER    Property identifier: namespace binder. 
protected static final  String DATATYPE_VALIDATOR_FACTORY    Property identifier: datatype validator factory. 
protected static final  String VALIDATION_MANAGER     
protected static final  String JAXP_SCHEMA_LANGUAGE    Property identifier: JAXP schema language / DOM schema-type. 
protected static final  String JAXP_SCHEMA_SOURCE    Property identifier: JAXP schema source/ DOM schema-location. 
protected static final  boolean PRINT_EXCEPTION_STACK_TRACE    Set to true and recompile to print exception stack trace. 
protected  XMLGrammarPool fGrammarPool    Grammar pool. 
protected  DTDDVFactory fDatatypeValidatorFactory    Datatype validator factory. 
protected  XMLErrorReporter fErrorReporter    Error reporter. 
protected  XMLEntityManager fEntityManager    Entity manager. 
protected  XMLDocumentScanner fScanner    Document scanner. 
protected  XMLInputSource fInputSource    Input Source 
protected  XMLDTDScanner fDTDScanner    DTD scanner. 
protected  XMLDTDProcessor fDTDProcessor    DTD Processor . 
protected  XMLDTDValidator fDTDValidator    DTD Validator. 
protected  XMLNamespaceBinder fNamespaceBinder    Namespace binder. 
protected  ValidationManager fValidationManager     
protected  XMLLocator fLocator    Locator 
protected  boolean fParseInProgress    True if a parse is in progress. This state is needed because some features/properties cannot be set while parsing (e.g. validation and namespaces). 
Fields inherited from org.apache.xerces.parsers.BasicParserConfiguration:
VALIDATION,  NAMESPACES,  EXTERNAL_GENERAL_ENTITIES,  EXTERNAL_PARAMETER_ENTITIES,  XML_STRING,  SYMBOL_TABLE,  ERROR_HANDLER,  ENTITY_RESOLVER,  fSymbolTable,  fLocale,  fComponents,  fDocumentHandler,  fDTDHandler,  fDTDContentModelHandler,  fLastComponent
Fields inherited from org.apache.xerces.util.ParserConfigurationSettings:
PARSER_SETTINGS,  fRecognizedProperties,  fProperties,  fRecognizedFeatures,  fFeatures,  fParentSettings
Constructor:
 public DTDConfiguration() 
 public DTDConfiguration(SymbolTable symbolTable) 
    Constructs a parser configuration using the specified symbol table.
    Parameters:
    symbolTable - The symbol table to use.
 public DTDConfiguration(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 DTDConfiguration(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.DTDConfiguration Summary:
checkFeature,   checkProperty,   cleanup,   configureDTDPipeline,   configurePipeline,   createDTDProcessor,   createDTDScanner,   createDTDValidator,   createDatatypeValidatorFactory,   createDocumentScanner,   createEntityManager,   createErrorReporter,   createNamespaceBinder,   createValidationManager,   parse,   parse,   reset,   setInputSource,   setLocale
Methods from org.apache.xerces.parsers.BasicParserConfiguration:
addComponent,   checkFeature,   checkProperty,   getDTDContentModelHandler,   getDTDHandler,   getDocumentHandler,   getEntityResolver,   getErrorHandler,   getLocale,   parse,   reset,   setDTDContentModelHandler,   setDTDHandler,   setDocumentHandler,   setEntityResolver,   setErrorHandler,   setFeature,   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.DTDConfiguration Detail:
 protected  void checkFeature(String featureId) throws XMLConfigurationException 
    Check a feature. If feature is know 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 know and supported, this method simply returns. Otherwise, the appropriate exception is thrown.
 public  void cleanup() 
    If the application decides to terminate parsing before the xml document is fully parsed, the application should call this method to free any resource allocated during parsing. For example, close all opened streams.
 protected  void configureDTDPipeline() 
 protected  void configurePipeline() 
    Configures the pipeline.
 protected XMLDTDProcessor createDTDProcessor() 
    Create a DTD loader .
 protected XMLDTDScanner createDTDScanner() 
    Create a DTD scanner.
 protected XMLDTDValidator createDTDValidator() 
    Create a DTD validator.
 protected DTDDVFactory createDatatypeValidatorFactory() 
    Create a datatype validator factory.
 protected XMLDocumentScanner createDocumentScanner() 
    Create a document scanner.
 protected XMLEntityManager createEntityManager() 
    Creates an entity manager.
 protected XMLErrorReporter createErrorReporter() 
    Creates an error reporter.
 protected XMLNamespaceBinder createNamespaceBinder() 
    Create a namespace binder.
 protected ValidationManager createValidationManager() 
 public boolean parse(boolean complete) throws IOException, XNIException 
    Parses the document in a pull parsing fashion.
 public  void parse(XMLInputSource source) throws IOException, XNIException 
    Parses the specified input source.
 protected  void reset() throws XNIException 
    Reset all components before parsing.
 public  void setInputSource(XMLInputSource inputSource) throws IOException, XMLConfigurationException 
    Sets the input source for the document to parse.
 public  void setLocale(Locale locale) throws XNIException 
    Set the locale to use for messages.