public class XMLDTDLoader extends XMLDTDProcessor implements org.apache.xerces.xni.grammars.XMLGrammarLoader
This component requires the following features and properties. It know ho to set them if no one else does:from the
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
BALANCE_SYNTAX_TREES
Feature identifier: balance syntax trees.
|
protected static java.lang.String |
ENTITY_RESOLVER
Property identifier: entity resolver.
|
protected static java.lang.String |
ERROR_HANDLER
Property identifier: error handler.
|
protected XMLDTDScannerImpl |
fDTDScanner |
protected XMLEntityManager |
fEntityManager |
protected org.apache.xerces.xni.parser.XMLEntityResolver |
fEntityResolver
Entity resolver .
|
protected java.util.Locale |
fLocale |
protected static java.lang.String |
LOCALE
Property identifier: locale.
|
protected static java.lang.String |
STANDARD_URI_CONFORMANT_FEATURE
Feature identifier: standard uri conformant feature.
|
DTD_VALIDATOR, ERROR_REPORTER, fDTDContentModelHandler, fDTDContentModelSource, fDTDGrammar, fDTDHandler, fDTDSource, fDTDValidation, fErrorReporter, fGrammarBucket, fGrammarPool, fInDTDIgnore, fSymbolTable, fValidation, fValidator, fWarnDuplicateAttdef, fWarnOnUndeclaredElemdef, GRAMMAR_POOL, NOTIFY_CHAR_REFS, PARSER_SETTINGS, SYMBOL_TABLE, VALIDATION, WARN_ON_DUPLICATE_ATTDEF, WARN_ON_UNDECLARED_ELEMDEF| Constructor and Description |
|---|
XMLDTDLoader()
Deny default construction; we need a SymtolTable!
|
XMLDTDLoader(SymbolTable symbolTable) |
XMLDTDLoader(SymbolTable symbolTable,
org.apache.xerces.xni.grammars.XMLGrammarPool grammarPool) |
| Modifier and Type | Method and Description |
|---|---|
protected XMLDTDScannerImpl |
createDTDScanner(SymbolTable symbolTable,
XMLErrorReporter errorReporter,
XMLEntityManager entityManager) |
org.apache.xerces.xni.parser.XMLEntityResolver |
getEntityResolver()
Returns the registered entity resolver.
|
org.apache.xerces.xni.parser.XMLErrorHandler |
getErrorHandler()
Returns the registered error handler.
|
boolean |
getFeature(java.lang.String featureId)
Returns the state of a feature.
|
java.util.Locale |
getLocale()
Return the Locale the XMLGrammarLoader is using.
|
java.lang.Object |
getProperty(java.lang.String propertyId)
Returns the state of a property.
|
java.lang.String[] |
getRecognizedFeatures()
Returns a list of feature identifiers that are recognized by
this component.
|
java.lang.String[] |
getRecognizedProperties()
Returns a list of property identifiers that are recognized by
this component.
|
protected short |
getScannerVersion() |
org.apache.xerces.xni.grammars.Grammar |
loadGrammar(org.apache.xerces.xni.parser.XMLInputSource source)
Returns a Grammar object by parsing the contents of the
entity pointed to by source.
|
void |
loadGrammarWithContext(XMLDTDValidator validator,
java.lang.String rootName,
java.lang.String publicId,
java.lang.String systemId,
java.lang.String baseSystemId,
java.lang.String internalSubset)
Parse a DTD internal and/or external subset and insert the content
into the existing DTD grammar owned by the given DTDValidator.
|
protected void |
reset() |
void |
setEntityResolver(org.apache.xerces.xni.parser.XMLEntityResolver entityResolver)
Sets the entity resolver.
|
void |
setErrorHandler(org.apache.xerces.xni.parser.XMLErrorHandler errorHandler)
Sets the error handler.
|
void |
setFeature(java.lang.String featureId,
boolean state)
Sets the state of a feature.
|
void |
setLocale(java.util.Locale locale)
Set the locale to use for messages.
|
void |
setProperty(java.lang.String propertyId,
java.lang.Object value)
Sets the value of a property.
|
any, attributeDecl, checkStandaloneEntityRef, comment, element, elementDecl, empty, endAttlist, endConditional, endContentModel, endDTD, endExternalSubset, endGroup, endParameterEntity, externalEntityDecl, getDTDContentModelHandler, getDTDContentModelSource, getDTDHandler, getDTDSource, getFeatureDefault, getPropertyDefault, ignoredCharacters, internalEntityDecl, isValidName, isValidNmtoken, notationDecl, occurrence, pcdata, processingInstruction, reset, separator, setDTDContentModelHandler, setDTDContentModelSource, setDTDHandler, setDTDSource, startAttlist, startConditional, startContentModel, startDTD, startExternalSubset, startGroup, startParameterEntity, textDecl, unparsedEntityDeclprotected static final java.lang.String STANDARD_URI_CONFORMANT_FEATURE
protected static final java.lang.String BALANCE_SYNTAX_TREES
protected static final java.lang.String ERROR_HANDLER
protected static final java.lang.String ENTITY_RESOLVER
protected static final java.lang.String LOCALE
protected org.apache.xerces.xni.parser.XMLEntityResolver fEntityResolver
protected XMLDTDScannerImpl fDTDScanner
protected XMLEntityManager fEntityManager
protected java.util.Locale fLocale
public XMLDTDLoader()
public XMLDTDLoader(SymbolTable symbolTable)
public XMLDTDLoader(SymbolTable symbolTable, org.apache.xerces.xni.grammars.XMLGrammarPool grammarPool)
public java.lang.String[] getRecognizedFeatures()
getRecognizedFeatures in interface org.apache.xerces.xni.grammars.XMLGrammarLoadergetRecognizedFeatures in interface org.apache.xerces.xni.parser.XMLComponentgetRecognizedFeatures in class XMLDTDProcessorpublic void setFeature(java.lang.String featureId,
boolean state)
throws org.apache.xerces.xni.parser.XMLConfigurationException
Note: Components should silently ignore features that do not affect the operation of the component.
setFeature in interface org.apache.xerces.xni.grammars.XMLGrammarLoadersetFeature in interface org.apache.xerces.xni.parser.XMLComponentsetFeature in class XMLDTDProcessorfeatureId - The feature identifier.state - The state of the feature.SAXNotRecognizedException - The component should not throw
this exception.SAXNotSupportedException - The component should not throw
this exception.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.public java.lang.String[] getRecognizedProperties()
getRecognizedProperties in interface org.apache.xerces.xni.grammars.XMLGrammarLoadergetRecognizedProperties in interface org.apache.xerces.xni.parser.XMLComponentgetRecognizedProperties in class XMLDTDProcessorpublic java.lang.Object getProperty(java.lang.String propertyId)
throws org.apache.xerces.xni.parser.XMLConfigurationException
getProperty in interface org.apache.xerces.xni.grammars.XMLGrammarLoaderpropertyId - The property identifier.org.apache.xerces.xni.parser.XMLConfigurationException - Thrown on configuration error.public void setProperty(java.lang.String propertyId,
java.lang.Object value)
throws org.apache.xerces.xni.parser.XMLConfigurationException
Note: Components should silently ignore properties that do not affect the operation of the component.
setProperty in interface org.apache.xerces.xni.grammars.XMLGrammarLoadersetProperty in interface org.apache.xerces.xni.parser.XMLComponentsetProperty in class XMLDTDProcessorpropertyId - The property identifier.value - The value of the property.SAXNotRecognizedException - The component should not throw
this exception.SAXNotSupportedException - The component should not throw
this exception.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.public boolean getFeature(java.lang.String featureId)
throws org.apache.xerces.xni.parser.XMLConfigurationException
getFeature in interface org.apache.xerces.xni.grammars.XMLGrammarLoaderfeatureId - The feature identifier.org.apache.xerces.xni.parser.XMLConfigurationException - Thrown on configuration error.public void setLocale(java.util.Locale locale)
setLocale in interface org.apache.xerces.xni.grammars.XMLGrammarLoaderlocale - The locale object to use for localization of messages.org.apache.xerces.xni.XNIException - Thrown if the parser does not support the
specified locale.public java.util.Locale getLocale()
getLocale in interface org.apache.xerces.xni.grammars.XMLGrammarLoaderpublic void setErrorHandler(org.apache.xerces.xni.parser.XMLErrorHandler errorHandler)
setErrorHandler in interface org.apache.xerces.xni.grammars.XMLGrammarLoadererrorHandler - The error handler.public org.apache.xerces.xni.parser.XMLErrorHandler getErrorHandler()
getErrorHandler in interface org.apache.xerces.xni.grammars.XMLGrammarLoaderpublic void setEntityResolver(org.apache.xerces.xni.parser.XMLEntityResolver entityResolver)
setEntityResolver in interface org.apache.xerces.xni.grammars.XMLGrammarLoaderentityResolver - The new entity resolver.public org.apache.xerces.xni.parser.XMLEntityResolver getEntityResolver()
getEntityResolver in interface org.apache.xerces.xni.grammars.XMLGrammarLoaderpublic org.apache.xerces.xni.grammars.Grammar loadGrammar(org.apache.xerces.xni.parser.XMLInputSource source)
throws java.io.IOException,
org.apache.xerces.xni.XNIException
loadGrammar in interface org.apache.xerces.xni.grammars.XMLGrammarLoadersource - the location of the entity which forms
the starting point of the grammar to be constructed.java.io.IOException - When a problem is encountered reading the entity
XNIException When a condition arises (such as a FatalError) that requires parsing
of the entity be terminated.org.apache.xerces.xni.XNIExceptionpublic void loadGrammarWithContext(XMLDTDValidator validator, java.lang.String rootName, java.lang.String publicId, java.lang.String systemId, java.lang.String baseSystemId, java.lang.String internalSubset) throws java.io.IOException, org.apache.xerces.xni.XNIException
java.io.IOExceptionorg.apache.xerces.xni.XNIExceptionprotected void reset()
reset in class XMLDTDProcessorprotected XMLDTDScannerImpl createDTDScanner(SymbolTable symbolTable, XMLErrorReporter errorReporter, XMLEntityManager entityManager)
protected short getScannerVersion()
Copyright © 1999-2022 The Apache Software Foundation. All Rights Reserved.