Xerces implementation of DOMConfiguration that maintains a table of recognized parameters.
BALANCE_SYNTAX_TREES
protected static final String BALANCE_SYNTAX_TREES
Feature identifier: balance syntax trees.
CDATA
protected static final short CDATA
COMMENTS
protected static final short COMMENTS
DISALLOW_DOCTYPE_DECL_FEATURE
protected static final String DISALLOW_DOCTYPE_DECL_FEATURE
Feature identifier: load external DTD.
DTD_VALIDATOR_FACTORY_PROPERTY
protected static final String DTD_VALIDATOR_FACTORY_PROPERTY
Property identifier: datatype validator factory.
DTD_VALIDATOR_PROPERTY
protected static final String DTD_VALIDATOR_PROPERTY
Property identifier: DTD validator.
DTNORMALIZATION
protected static final short DTNORMALIZATION
DYNAMIC_VALIDATION
protected static final String DYNAMIC_VALIDATION
ENTITIES
protected static final short ENTITIES
ENTITY_MANAGER
protected static final String ENTITY_MANAGER
Property identifier: entity manager.
ENTITY_RESOLVER
protected static final String ENTITY_RESOLVER
Property identifier: entity resolver.
ERROR_HANDLER
protected static final String ERROR_HANDLER
Property identifier: error handler.
ERROR_REPORTER
protected static final String ERROR_REPORTER
Property identifier: error reporter.
GENERATE_SYNTHETIC_ANNOTATIONS
protected static final String GENERATE_SYNTHETIC_ANNOTATIONS
Feature: generate synthetic annotations
GRAMMAR_POOL
protected static final String GRAMMAR_POOL
Property id: Grammar pool
HONOUR_ALL_SCHEMALOCATIONS
protected static final String HONOUR_ALL_SCHEMALOCATIONS
Feature identifier: honour all schemaLocations
INFOSET_FALSE_PARAMS
protected static final short INFOSET_FALSE_PARAMS
INFOSET_MASK
protected static final short INFOSET_MASK
INFOSET_TRUE_PARAMS
protected static final short INFOSET_TRUE_PARAMS
JAXP_SCHEMA_LANGUAGE
protected static final String JAXP_SCHEMA_LANGUAGE
Property identifier: JAXP schema language / DOM schema-type.
JAXP_SCHEMA_SOURCE
protected static final String JAXP_SCHEMA_SOURCE
Property identifier: JAXP schema source/ DOM schema-location.
NAMESPACES
protected static final short NAMESPACES
NORMALIZE_DATA
protected static final String NORMALIZE_DATA
NSDECL
protected static final short NSDECL
PSVI
protected static final short PSVI
SCHEMA
protected static final String SCHEMA
SCHEMA_ELEMENT_DEFAULT
protected static final String SCHEMA_ELEMENT_DEFAULT
Feature identifier: send element default value via characters()
SCHEMA_FULL_CHECKING
protected static final String SCHEMA_FULL_CHECKING
SCHEMA_LOCATION
protected static final String SCHEMA_LOCATION
Property identifier: schema location.
SCHEMA_NONS_LOCATION
protected static final String SCHEMA_NONS_LOCATION
Property identifier: no namespace schema location.
SEND_PSVI
protected static final String SEND_PSVI
sending psvi in the pipeline
SPLITCDATA
protected static final short SPLITCDATA
SYMBOL_TABLE
protected static final String SYMBOL_TABLE
Property identifier: symbol table.
USE_GRAMMAR_POOL_ONLY
protected static final String USE_GRAMMAR_POOL_ONLY
Feature identifier: use grammar pool only
VALIDATE
protected static final short VALIDATE
VALIDATE_ANNOTATIONS
protected static final String VALIDATE_ANNOTATIONS
Feature identifier: validate annotations
VALIDATION_MANAGER
protected static final String VALIDATION_MANAGER
WARN_ON_DUPLICATE_ATTDEF
protected static final String WARN_ON_DUPLICATE_ATTDEF
Feature identifier: warn on duplicate attribute definition.
WELLFORMED
protected static final short WELLFORMED
XERCES_NAMESPACES
protected static final String XERCES_NAMESPACES
Feature identifier: namespaces.
XERCES_VALIDATION
protected static final String XERCES_VALIDATION
Feature identifier: validation.
XML11_DATATYPE_VALIDATOR_FACTORY
protected static final String XML11_DATATYPE_VALIDATOR_FACTORY
XML_STRING
protected static final String XML_STRING
Property identifier: xml string.
fComponents
protected ArrayList fComponents
Components.
fCurrentDVFactory
protected DTDDVFactory fCurrentDVFactory
Current Datatype validator factory.
fDatatypeValidatorFactory
protected DTDDVFactory fDatatypeValidatorFactory
The XML 1.0 Datatype validator factory.
fLocale
protected Locale fLocale
Locale.
fSymbolTable
protected SymbolTable fSymbolTable
Symbol table.
fXML11DatatypeFactory
protected DTDDVFactory fXML11DatatypeFactory
The XML 1.1 Datatype validator factory. *
features
protected short features
Normalization features
addComponent
protected void addComponent(org.apache.xerces.xni.parser.XMLComponent component)
canSetParameter
public boolean canSetParameter(String name,
Object value)
DOM Level 3 WD - Experimental.
Check if setting a parameter to a specific value is supported.
- canSetParameter in interface org.w3c.dom.DOMConfiguration
name
- The name of the parameter to check.value
- An object. if null, the returned value is true.
- true if the parameter could be successfully set to the
specified value, or false if the parameter is not recognized or
the requested value is not supported. This does not change the
current value of the parameter itself.
checkProperty
protected void checkProperty(String propertyId)
throws org.apache.xerces.xni.parser.XMLConfigurationException
Check a property. If the property is known and supported, this method
simply returns. Otherwise, the appropriate exception is thrown.
- checkProperty in interface ParserConfigurationSettings
propertyId
- The unique identifier (URI) of the property
being set.
org.apache.xerces.xni.parser.XMLConfigurationException
- If the
requested feature is not known or supported.
getDTDContentModelHandler
public org.apache.xerces.xni.XMLDTDContentModelHandler getDTDContentModelHandler()
Returns the registered DTD content model handler.
- getDTDContentModelHandler in interface org.apache.xerces.xni.parser.XMLParserConfiguration
getDTDHandler
public org.apache.xerces.xni.XMLDTDHandler getDTDHandler()
Returns the registered DTD handler.
- getDTDHandler in interface org.apache.xerces.xni.parser.XMLParserConfiguration
getDocumentHandler
public org.apache.xerces.xni.XMLDocumentHandler getDocumentHandler()
Returns the registered document handler.
- getDocumentHandler in interface org.apache.xerces.xni.parser.XMLParserConfiguration
getEntityResolver
public org.apache.xerces.xni.parser.XMLEntityResolver getEntityResolver()
Return the current entity resolver.
- getEntityResolver in interface org.apache.xerces.xni.parser.XMLParserConfiguration
- The current entity resolver, or null if none
has been registered.
getErrorHandler
public org.apache.xerces.xni.parser.XMLErrorHandler getErrorHandler()
Return the current error handler.
- getErrorHandler in interface org.apache.xerces.xni.parser.XMLParserConfiguration
- The current error handler, or null if none
has been registered.
getFeature
public boolean getFeature(String featureId)
throws org.apache.xerces.xni.parser.XMLConfigurationException
Returns the state of a feature.
- getFeature in interface org.apache.xerces.xni.parser.XMLParserConfiguration
- getFeature in interface org.apache.xerces.xni.parser.XMLComponentManager
- getFeature in interface ParserConfigurationSettings
featureId
- The feature identifier.
- true if the feature is supported
org.apache.xerces.xni.parser.XMLConfigurationException
- Thrown for configuration error.
In general, components should
only throw this exception if
it is really
a critical error.
getLocale
public Locale getLocale()
Returns the locale.
- getLocale in interface org.apache.xerces.xni.parser.XMLParserConfiguration
getParameter
public Object getParameter(String name)
throws org.w3c.dom.DOMException
DOM Level 3 WD - Experimental.
getParameter
- getParameter in interface org.w3c.dom.DOMConfiguration
getParameterNames
public org.w3c.dom.DOMStringList getParameterNames()
DOM Level 3 CR - Experimental.
The list of the parameters supported by this
DOMConfiguration
object and for which at least one value
can be set by the application. Note that this list can also contain
parameter names defined outside this specification.
- getParameterNames in interface org.w3c.dom.DOMConfiguration
parse
public void parse(org.apache.xerces.xni.parser.XMLInputSource inputSource)
throws org.apache.xerces.xni.XNIException,
IOException
Parse an XML document.
The parser can use this method to instruct this configuration
to begin parsing an XML document from any valid input source
(a character stream, a byte stream, or a URI).
Parsers may not invoke this method while a parse is in progress.
Once a parse is complete, the parser may then parse another XML
document.
This method is synchronous: it will not return until parsing
has ended. If a client application wants to terminate
parsing early, it should throw an exception.
- parse in interface org.apache.xerces.xni.parser.XMLParserConfiguration
org.apache.xerces.xni.XNIException
- Any XNI exception, possibly wrapping
another exception.
reset
protected void reset()
throws org.apache.xerces.xni.XNIException
reset all components before parsing
setDTDContentModelHandler
public void setDTDContentModelHandler(org.apache.xerces.xni.XMLDTDContentModelHandler handler)
Sets the DTD content model handler.
- setDTDContentModelHandler in interface org.apache.xerces.xni.parser.XMLParserConfiguration
handler
- The DTD content model handler.
setDTDHandler
public void setDTDHandler(org.apache.xerces.xni.XMLDTDHandler dtdHandler)
Sets the DTD handler.
- setDTDHandler in interface org.apache.xerces.xni.parser.XMLParserConfiguration
dtdHandler
- The DTD handler.
setDTDValidatorFactory
protected final void setDTDValidatorFactory(String version)
setDocumentHandler
public void setDocumentHandler(org.apache.xerces.xni.XMLDocumentHandler documentHandler)
Sets the document handler on the last component in the pipeline
to receive information about the document.
- setDocumentHandler in interface org.apache.xerces.xni.parser.XMLParserConfiguration
documentHandler
- The document handler.
setEntityResolver
public void setEntityResolver(org.apache.xerces.xni.parser.XMLEntityResolver resolver)
Sets the resolver used to resolve external entities. The EntityResolver
interface supports resolution of public and system identifiers.
- setEntityResolver in interface org.apache.xerces.xni.parser.XMLParserConfiguration
resolver
- The new entity resolver. Passing a null value will
uninstall the currently installed resolver.
setErrorHandler
public void setErrorHandler(org.apache.xerces.xni.parser.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.
- setErrorHandler in interface org.apache.xerces.xni.parser.XMLParserConfiguration
errorHandler
- The error handler.
setFeature
public void setFeature(String featureId,
boolean state)
throws org.apache.xerces.xni.parser.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.
- setFeature in interface org.apache.xerces.xni.parser.XMLParserConfiguration
- setFeature in interface ParserConfigurationSettings
featureId
- The unique identifier (URI) of the feature.state
- The requested state of the feature (true or false).
org.apache.xerces.xni.parser.XMLConfigurationException
- If the
requested feature is not known.
setLocale
public void setLocale(Locale locale)
throws org.apache.xerces.xni.XNIException
Set the locale to use for messages.
- setLocale in interface org.apache.xerces.xni.parser.XMLParserConfiguration
locale
- The locale object to use for localization of messages.
org.apache.xerces.xni.XNIException
- Thrown if the parser does not support the
specified locale.
setParameter
public void setParameter(String name,
Object value)
throws org.w3c.dom.DOMException
DOM Level 3 WD - Experimental.
setParameter
- setParameter in interface org.w3c.dom.DOMConfiguration
setProperty
public void setProperty(String propertyId,
Object value)
throws org.apache.xerces.xni.parser.XMLConfigurationException
setProperty
- setProperty in interface org.apache.xerces.xni.parser.XMLParserConfiguration
- setProperty in interface ParserConfigurationSettings