This class is the configuration used to parse XML 1.0 and XML 1.1 documents.
author: Elena Litani, IBM author: Neil Graham, IBM author: Michael Glavassevich, IBM version: $Id: XML11Configuration.java 548192 2007-06-18 03:34:19Z mrglavas $
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.
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.
setDocumentHandler(XMLDocumentHandler documentHandler) Sets the document handler on the last component in the pipeline
to receive information about the document.
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.
public void
setFeature(String featureId, boolean state) Set the state of a feature.
Set the state of any feature in a SAX2 parser.
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. Parameters: grammarPool - The grammar pool to use.
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. Parameters: grammarPool - The grammar pool to use. Parameters: parentSettings - The parent settings.
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.
Parameters: component - The component to add.
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.
Parameters: component - The component to add.
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.
Parameters: component - The component whose recognized featuresand properties will be added to the configuration
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.
Parameters: component - The component to add.
Check a feature. If feature is know and supported, this method simply
returns. Otherwise, the appropriate exception is thrown.
Parameters: featureId - The unique identifier (URI) of the feature. throws: XMLConfigurationException - Thrown for configuration error.In general, components shouldonly throw this exception ifit is reallya critical error.
Check a property. If the property is know and supported, this method
simply returns. Otherwise, the appropriate exception is thrown.
Parameters: propertyId - The unique identifier (URI) of the propertybeing set. throws: XMLConfigurationException - Thrown for configuration error.In general, components shouldonly throw this exception ifit is reallya critical error.
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.
Returns the state of a feature.
Parameters: featureId - The feature identifier. true if the feature is supported throws: XMLConfigurationException - Thrown for configuration error.In general, components shouldonly throw this exception ifit is reallya critical error.
Sets the document handler on the last component in the pipeline
to receive information about the document.
Parameters: documentHandler - The document handler.
Sets the resolver used to resolve external entities. The EntityResolver
interface supports resolution of public and system identifiers.
Parameters: resolver - The new entity resolver. Passing a null value willuninstall the currently installed resolver.
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.
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.
Parameters: featureId - The unique identifier (URI) of the feature. Parameters: state - The requested state of the feature (true or false). exception: org.apache.xerces.xni.parser.XMLConfigurationException - If therequested feature is not known.
Sets the input source for the document to parse.
Parameters: inputSource - The document's input source. exception: XMLConfigurationException - Thrown if there is a configuration error when initializing theparser. exception: IOException - Thrown on I/O error. See Also:XML11Configuration.parse(boolean)
Set the locale to use for messages.
Parameters: locale - The locale object to use for localization of messages. exception: XNIException - Thrown if the parser does not support thespecified locale.