public class XMLDTDLoader extends XMLDTDProcessor implements 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 String |
BALANCE_SYNTAX_TREES
Feature identifier: balance syntax trees.
|
static String |
ENTITY_RESOLVER
Property identifier: entity resolver.
|
protected static String |
ERROR_HANDLER
Property identifier: error handler.
|
protected XMLDTDScannerImpl |
fDTDScanner |
protected XMLEntityManager |
fEntityManager |
protected XMLEntityResolver |
fEntityResolver
Entity resolver .
|
protected Locale |
fLocale |
static String |
LOCALE
Property identifier: locale.
|
protected static 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_ELEMDEFCONDITIONAL_IGNORE, CONDITIONAL_INCLUDEOCCURS_ONE_OR_MORE, OCCURS_ZERO_OR_MORE, OCCURS_ZERO_OR_ONE, SEPARATOR_CHOICE, SEPARATOR_SEQUENCE| Constructor and Description |
|---|
XMLDTDLoader()
Deny default construction; we need a SymtolTable!
|
XMLDTDLoader(SymbolTable symbolTable) |
XMLDTDLoader(SymbolTable symbolTable,
XMLGrammarPool grammarPool) |
| Modifier and Type | Method and Description |
|---|---|
protected XMLDTDScannerImpl |
createDTDScanner(SymbolTable symbolTable,
XMLErrorReporter errorReporter,
XMLEntityManager entityManager) |
XMLEntityResolver |
getEntityResolver()
Returns the registered entity resolver.
|
XMLErrorHandler |
getErrorHandler()
Returns the registered error handler.
|
boolean |
getFeature(String featureId)
Returns the state of a feature.
|
Locale |
getLocale()
Return the Locale the XMLGrammarLoader is using.
|
Object |
getProperty(String propertyId)
Returns the state of a property.
|
String[] |
getRecognizedFeatures()
Returns a list of feature identifiers that are recognized by
this component.
|
String[] |
getRecognizedProperties()
Returns a list of property identifiers that are recognized by
this component.
|
protected short |
getScannerVersion() |
Grammar |
loadGrammar(XMLInputSource source)
Returns a Grammar object by parsing the contents of the
entity pointed to by source.
|
void |
loadGrammarWithContext(XMLDTDValidator validator,
String rootName,
String publicId,
String systemId,
String baseSystemId,
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(XMLEntityResolver entityResolver)
Sets the entity resolver.
|
void |
setErrorHandler(XMLErrorHandler errorHandler)
Sets the error handler.
|
void |
setFeature(String featureId,
boolean state)
Sets the state of a feature.
|
void |
setLocale(Locale locale)
Set the locale to use for messages.
|
void |
setProperty(String propertyId,
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 String STANDARD_URI_CONFORMANT_FEATURE
protected static final String BALANCE_SYNTAX_TREES
protected static final String ERROR_HANDLER
public static final String ENTITY_RESOLVER
public static final String LOCALE
protected XMLEntityResolver fEntityResolver
protected XMLDTDScannerImpl fDTDScanner
protected XMLEntityManager fEntityManager
protected Locale fLocale
public XMLDTDLoader()
public XMLDTDLoader(SymbolTable symbolTable)
public XMLDTDLoader(SymbolTable symbolTable, XMLGrammarPool grammarPool)
public String[] getRecognizedFeatures()
getRecognizedFeatures in interface XMLGrammarLoadergetRecognizedFeatures in interface XMLComponentgetRecognizedFeatures in class XMLDTDProcessorpublic void setFeature(String featureId, boolean state) throws XMLConfigurationException
Note: Components should silently ignore features that do not affect the operation of the component.
setFeature in interface XMLGrammarLoadersetFeature in interface 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.XMLConfigurationException - Thrown for configuration error.
In general, components should
only throw this exception if
it is really
a critical error.public String[] getRecognizedProperties()
getRecognizedProperties in interface XMLGrammarLoadergetRecognizedProperties in interface XMLComponentgetRecognizedProperties in class XMLDTDProcessorpublic Object getProperty(String propertyId) throws XMLConfigurationException
getProperty in interface XMLGrammarLoaderpropertyId - The property identifier.XMLConfigurationException - Thrown on configuration error.public void setProperty(String propertyId, Object value) throws XMLConfigurationException
Note: Components should silently ignore properties that do not affect the operation of the component.
setProperty in interface XMLGrammarLoadersetProperty in interface 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.XMLConfigurationException - Thrown for configuration error.
In general, components should
only throw this exception if
it is really
a critical error.public boolean getFeature(String featureId) throws XMLConfigurationException
getFeature in interface XMLGrammarLoaderfeatureId - The feature identifier.XMLConfigurationException - Thrown on configuration error.public void setLocale(Locale locale)
setLocale in interface XMLGrammarLoaderlocale - The locale object to use for localization of messages.XNIException - Thrown if the parser does not support the
specified locale.public Locale getLocale()
getLocale in interface XMLGrammarLoaderpublic void setErrorHandler(XMLErrorHandler errorHandler)
setErrorHandler in interface XMLGrammarLoadererrorHandler - The error handler.public XMLErrorHandler getErrorHandler()
getErrorHandler in interface XMLGrammarLoaderpublic void setEntityResolver(XMLEntityResolver entityResolver)
setEntityResolver in interface XMLGrammarLoaderentityResolver - The new entity resolver.public XMLEntityResolver getEntityResolver()
getEntityResolver in interface XMLGrammarLoaderpublic Grammar loadGrammar(XMLInputSource source) throws IOException, XNIException
loadGrammar in interface XMLGrammarLoadersource - the location of the entity which forms
the starting point of the grammar to be constructed.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.XNIExceptionpublic void loadGrammarWithContext(XMLDTDValidator validator, String rootName, String publicId, String systemId, String baseSystemId, String internalSubset) throws IOException, XNIException
IOExceptionXNIExceptionprotected void reset()
reset in class XMLDTDProcessorprotected XMLDTDScannerImpl createDTDScanner(SymbolTable symbolTable, XMLErrorReporter errorReporter, XMLEntityManager entityManager)
protected short getScannerVersion()
Copyright © 2016 JBoss by Red Hat. All rights reserved.