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

All Implemented Interfaces:
    XMLPullParserConfiguration, XML11Configurable, XMLComponentManager

Direct Known Subclasses:
    XPointerParserConfiguration, SoftReferenceSymbolTableConfiguration, PSVIConfiguration, XIncludeAwareParserConfiguration, XMLGrammarCachingConfiguration, SecurityConfiguration, XIncludeParserConfiguration

This class is the configuration used to parse XML 1.0 and XML 1.1 documents.
Field Summary
protected static final  String XML11_DATATYPE_VALIDATOR_FACTORY     
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 NORMALIZE_DATA    Feature identifier: expose schema normalized value 
protected static final  String SCHEMA_ELEMENT_DEFAULT    Feature identifier: send element default value via characters() 
protected static final  String SCHEMA_AUGMENT_PSVI    Feature identifier: augment PSVI 
protected static final  String XMLSCHEMA_VALIDATION    feature identifier: XML Schema validation 
protected static final  String XMLSCHEMA_FULL_CHECKING    feature identifier: XML Schema validation -- full checking 
protected static final  String GENERATE_SYNTHETIC_ANNOTATIONS    Feature: generate synthetic annotations 
protected static final  String VALIDATE_ANNOTATIONS    Feature identifier: validate annotations 
protected static final  String HONOUR_ALL_SCHEMALOCATIONS    Feature identifier: honour all schemaLocations 
protected static final  String USE_GRAMMAR_POOL_ONLY    Feature identifier: use grammar pool only 
protected static final  String VALIDATION    Feature identifier: validation. 
protected static final  String NAMESPACES    Feature identifier: namespaces. 
protected static final  String EXTERNAL_GENERAL_ENTITIES    Feature identifier: external general entities. 
protected static final  String EXTERNAL_PARAMETER_ENTITIES    Feature identifier: external parameter entities. 
protected static final  String IGNORE_XSI_TYPE    Feature identifier: whether to ignore xsi:type attributes until a global element declaration is encountered 
protected static final  String ID_IDREF_CHECKING    Feature identifier: whether to ignore ID/IDREF errors 
protected static final  String UNPARSED_ENTITY_CHECKING    Feature identifier: whether to ignore unparsed entity errors 
protected static final  String IDENTITY_CONSTRAINT_CHECKING    Feature identifier: whether to ignore identity constraint errors 
protected static final  String XML_STRING    Property identifier: xml string. 
protected static final  String SYMBOL_TABLE    Property identifier: symbol table. 
protected static final  String ERROR_HANDLER    Property identifier: error handler. 
protected static final  String ENTITY_RESOLVER    Property identifier: entity resolver. 
protected static final  String SCHEMA_VALIDATOR    Property identifier: XML Schema validator. 
protected static final  String SCHEMA_LOCATION    Property identifier: schema location. 
protected static final  String SCHEMA_NONS_LOCATION    Property identifier: no namespace schema location. 
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  String ROOT_TYPE_DEF    Property identifier: root type definition. 
protected static final  boolean PRINT_EXCEPTION_STACK_TRACE    Set to true and recompile to print exception stack trace. 
protected  SymbolTable fSymbolTable     
protected  XMLInputSource fInputSource     
protected  ValidationManager fValidationManager     
protected  XMLVersionDetector fVersionDetector     
protected  XMLLocator fLocator     
protected  Locale fLocale     
protected  ArrayList fComponents    XML 1.0 Components. 
protected  ArrayList fXML11Components    XML 1.1. Components. 
protected  ArrayList fCommonComponents    Common components: XMLEntityManager, XMLErrorReporter, XMLSchemaValidator 
protected  XMLDocumentHandler fDocumentHandler    The document handler. 
protected  XMLDTDHandler fDTDHandler    The DTD handler. 
protected  XMLDTDContentModelHandler fDTDContentModelHandler    The DTD content model handler. 
protected  XMLDocumentSource fLastComponent    Last component in the document pipeline 
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). 
protected  boolean fConfigUpdated    fConfigUpdated is set to true if there has been any change to the configuration settings, i.e a feature or a property was changed. 
protected  DTDDVFactory fDatatypeValidatorFactory    The XML 1.0 Datatype validator factory. 
protected  XMLNSDocumentScannerImpl fNamespaceScanner    The XML 1.0 Document scanner that does namespace binding. 
protected  XMLDocumentScannerImpl fNonNSScanner    The XML 1.0 Non-namespace implementation of scanner 
protected  XMLDTDValidator fDTDValidator    The XML 1.0 DTD Validator: binds namespaces 
protected  XMLDTDValidator fNonNSDTDValidator    The XML 1.0 DTD Validator that does not bind namespaces 
protected  XMLDTDScanner fDTDScanner    The XML 1.0 DTD scanner. 
protected  XMLDTDProcessor fDTDProcessor    The XML 1.0 DTD Processor . 
protected  DTDDVFactory fXML11DatatypeFactory    The XML 1.1 datatype factory. 
protected  XML11NSDocumentScannerImpl fXML11NSDocScanner    The XML 1.1 document scanner that does namespace binding. 
protected  XML11DocumentScannerImpl fXML11DocScanner    The XML 1.1 document scanner that does not do namespace binding. 
protected  XML11NSDTDValidator fXML11NSDTDValidator    The XML 1.1 DTD validator that does namespace binding. 
protected  XML11DTDValidator fXML11DTDValidator    The XML 1.1 DTD validator that does not do namespace binding. 
protected  XML11DTDScannerImpl fXML11DTDScanner    The XML 1.1 DTD scanner. 
protected  XML11DTDProcessor fXML11DTDProcessor    The XML 1.1 DTD processor. 
protected  XMLGrammarPool fGrammarPool    Grammar pool. 
protected  XMLErrorReporter fErrorReporter    Error reporter. 
protected  XMLEntityManager fEntityManager    Entity manager. 
protected  XMLSchemaValidator fSchemaValidator    XML Schema Validator. 
protected  XMLDocumentScanner fCurrentScanner    Current scanner 
protected  DTDDVFactory fCurrentDVFactory    Current Datatype validator factory. 
protected  XMLDTDScanner fCurrentDTDScanner    Current DTD scanner. 
Fields inherited from org.apache.xerces.util.ParserConfigurationSettings:
PARSER_SETTINGS,  fRecognizedProperties,  fProperties,  fRecognizedFeatures,  fFeatures,  fParentSettings
Constructor:
 public XML11Configuration() 
 public XML11Configuration(SymbolTable symbolTable) 
    Constructs a parser configuration using the specified symbol table.
    Parameters:
    symbolTable - The symbol table to use.
 public XML11Configuration(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 XML11Configuration(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.XML11Configuration Summary:
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.XML11Configuration Detail:
 protected  void addCommonComponent(XMLComponent component) 
    Adds common component to the parser configuration. This method will also add all of the component's recognized features and properties to the list of default recognized features and properties.
 protected  void addComponent(XMLComponent component) 
    Adds a component to the parser configuration. This method will also add all of the component's recognized features and properties to the list of default recognized features and properties.
 protected  void addRecognizedParamsAndSetDefaults(XMLComponent component) 
    Adds all of the component's recognized features and properties to the list of default recognized features and properties, and sets default values on the configuration for features and properties which were previously absent from the configuration.
 protected  void addXML11Component(XMLComponent component) 
    Adds an XML 1.1 component to the parser configuration. This method will also add all of the component's recognized features and properties to the list of default recognized features and properties.
 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 configurePipeline() 
    Configures the pipeline.
 protected  void configureXML11Pipeline() 
    Configures the XML 1.1 pipeline. Note: this method also resets the new XML11 components.
 public XMLDTDContentModelHandler getDTDContentModelHandler() 
    Returns the registered DTD content model handler.
 public XMLDTDHandler getDTDHandler() 
    Returns the registered DTD handler.
 public XMLDocumentHandler getDocumentHandler() 
    Returns the registered document handler.
 public XMLEntityResolver getEntityResolver() 
    Return the current entity resolver.
 public XMLErrorHandler getErrorHandler() 
    Return the current error handler.
 public boolean getFeature(String featureId) throws XMLConfigurationException 
    Returns the state of a feature.
 boolean getFeature0(String featureId) throws XMLConfigurationException 
    Returns the state of a feature. This method calls getFeature() on ParserConfigurationSettings, bypassing getFeature() on this class.
 public Locale getLocale() 
    Returns the locale.
 public  void parse(XMLInputSource source) throws IOException, XNIException 
    Parses the specified input source.
 public boolean parse(boolean complete) throws IOException, XNIException 
 protected  void reset() throws XNIException 
    reset all XML 1.0 components before parsing and namespace context
 protected  void resetCommon() throws XNIException 
    reset all common components before parsing
 protected  void resetXML11() throws XNIException 
    reset all components before parsing and namespace context
 public  void setDTDContentModelHandler(XMLDTDContentModelHandler handler) 
    Sets the DTD content model handler.
 public  void setDTDHandler(XMLDTDHandler dtdHandler) 
    Sets the DTD handler.
 public  void setDocumentHandler(XMLDocumentHandler documentHandler) 
    Sets the document handler on the last component in the pipeline to receive information about the document.
 public  void setEntityResolver(XMLEntityResolver resolver) 
    Sets the resolver used to resolve external entities. The EntityResolver interface supports resolution of public and system identifiers.
 public  void setErrorHandler(XMLErrorHandler errorHandler) 
    Allow an application to register an error event handler.

    If the application does not register an error handler, all error events reported by the SAX parser will be silently ignored; however, normal processing may not continue. It is highly recommended that all SAX applications implement an error handler to avoid unexpected bugs.

    Applications may register a new or different handler in the middle of a parse, and the SAX parser must begin using the new handler immediately.

 public  void setFeature(String featureId,
    boolean state) throws XMLConfigurationException 
    Set the state of a feature. Set the state of any feature in a SAX2 parser. The parser might not recognize the feature, and if it does recognize it, it might not be able to fulfill the request.
 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.
 public  void setProperty(String propertyId,
    Object value) throws XMLConfigurationException 
    setProperty