org.apache.xerces.impl.dtd
Class XMLDTDLoader
- org.apache.xerces.xni.parser.XMLComponent, org.apache.xerces.xni.parser.XMLDTDContentModelFilter, org.apache.xerces.xni.parser.XMLDTDFilter, org.apache.xerces.xni.grammars.XMLGrammarLoader
public class XMLDTDLoader
implements org.apache.xerces.xni.grammars.XMLGrammarLoader
The DTD loader. The loader knows how to build grammars from XMLInputSources.
It extends the DTD processor in order to do this; it's
a separate class because DTD processors don't need to know how
to talk to the outside world in their role as instance-document
helpers.
This component requires the following features and properties. It
know ho to set them if no one else does:from the
- http://xml.org/sax/features/namespaces
- http://apache.org/xml/properties/internal/symbol-table
- http://apache.org/xml/properties/internal/error-reporter
- http://apache.org/xml/properties/internal/grammar-pool
- http://apache.org/xml/properties/internal/datatype-validator-factory
$Id: XMLDTDLoader.java,v 1.11 2004/10/04 21:57:30 mrglavas Exp $
DTD_VALIDATOR , ERROR_REPORTER , GRAMMAR_POOL , NOTIFY_CHAR_REFS , PARSER_SETTINGS , SYMBOL_TABLE , VALIDATION , WARN_ON_DUPLICATE_ATTDEF , fDTDContentModelHandler , fDTDContentModelSource , fDTDGrammar , fDTDHandler , fDTDSource , fDTDValidation , fErrorReporter , fGrammarBucket , fGrammarPool , fInDTDIgnore , fLocale , fSymbolTable , fValidation , fValidator , fWarnDuplicateAttdef |
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(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[] | getRecognizedProperties() - Returns a list of property identifiers that are recognized by
this component.
|
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.
|
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(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 , getRecognizedFeatures , getRecognizedProperties , ignoredCharacters , internalEntityDecl , isValidName , isValidNmtoken , notationDecl , occurrence , pcdata , processingInstruction , reset , reset , separator , setDTDContentModelHandler , setDTDContentModelSource , setDTDHandler , setDTDSource , setFeature , setProperty , startAttlist , startConditional , startContentModel , startDTD , startExternalSubset , startGroup , startParameterEntity , textDecl , unparsedEntityDecl |
ENTITY_RESOLVER
public static final String ENTITY_RESOLVER
Property identifier: entity resolver.
ERROR_HANDLER
protected static final String ERROR_HANDLER
Property identifier: error handler.
STANDARD_URI_CONFORMANT_FEATURE
protected static final String STANDARD_URI_CONFORMANT_FEATURE
Feature identifier: standard uri conformant feature.
fEntityResolver
protected org.apache.xerces.xni.parser.XMLEntityResolver fEntityResolver
Entity resolver .
fLocale
protected Locale fLocale
XMLDTDLoader
public XMLDTDLoader()
Deny default construction; we need a SymtolTable!
XMLDTDLoader
public XMLDTDLoader(SymbolTable symbolTable)
XMLDTDLoader
public XMLDTDLoader(SymbolTable symbolTable,
org.apache.xerces.xni.grammars.XMLGrammarPool grammarPool)
getEntityResolver
public org.apache.xerces.xni.parser.XMLEntityResolver getEntityResolver()
Returns the registered entity resolver.
- getEntityResolver in interface org.apache.xerces.xni.grammars.XMLGrammarLoader
getErrorHandler
public org.apache.xerces.xni.parser.XMLErrorHandler getErrorHandler()
Returns the registered error handler.
- getErrorHandler in interface org.apache.xerces.xni.grammars.XMLGrammarLoader
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.grammars.XMLGrammarLoader
featureId
- The feature identifier.
org.apache.xerces.xni.parser.XMLConfigurationException
- Thrown on configuration error.
getLocale
public Locale getLocale()
Return the Locale the XMLGrammarLoader is using.
- getLocale in interface org.apache.xerces.xni.grammars.XMLGrammarLoader
getProperty
public Object getProperty(String propertyId)
throws org.apache.xerces.xni.parser.XMLConfigurationException
Returns the state of a property.
- getProperty in interface org.apache.xerces.xni.grammars.XMLGrammarLoader
propertyId
- The property identifier.
org.apache.xerces.xni.parser.XMLConfigurationException
- Thrown on configuration error.
getRecognizedProperties
public String[] getRecognizedProperties()
Returns a list of property identifiers that are recognized by
this component. This method may return null if no properties
are recognized by this component.
- getRecognizedProperties in interface org.apache.xerces.xni.grammars.XMLGrammarLoader
- getRecognizedProperties in interface org.apache.xerces.xni.parser.XMLComponent
- getRecognizedProperties in interface XMLDTDProcessor
loadGrammar
public org.apache.xerces.xni.grammars.Grammar loadGrammar(org.apache.xerces.xni.parser.XMLInputSource source)
throws IOException,
org.apache.xerces.xni.XNIException
Returns a Grammar object by parsing the contents of the
entity pointed to by source.
- loadGrammar in interface org.apache.xerces.xni.grammars.XMLGrammarLoader
source
- the location of the entity which forms
the starting point of the grammar to be constructed.
setEntityResolver
public void setEntityResolver(org.apache.xerces.xni.parser.XMLEntityResolver entityResolver)
Sets the entity resolver.
- setEntityResolver in interface org.apache.xerces.xni.grammars.XMLGrammarLoader
entityResolver
- The new entity resolver.
setErrorHandler
public void setErrorHandler(org.apache.xerces.xni.parser.XMLErrorHandler errorHandler)
Sets the error handler.
- setErrorHandler in interface org.apache.xerces.xni.grammars.XMLGrammarLoader
errorHandler
- The error handler.
setFeature
public void setFeature(String featureId,
boolean state)
throws org.apache.xerces.xni.parser.XMLConfigurationException
Sets the state of a feature. This method is called by the component
manager any time after reset when a feature changes state.
Note: Components should silently ignore features
that do not affect the operation of the component.
- setFeature in interface org.apache.xerces.xni.grammars.XMLGrammarLoader
- setFeature in interface org.apache.xerces.xni.parser.XMLComponent
- setFeature in interface XMLDTDProcessor
featureId
- The feature identifier.state
- The state of the feature.
setLocale
public void setLocale(Locale locale)
Set the locale to use for messages.
- setLocale in interface org.apache.xerces.xni.grammars.XMLGrammarLoader
locale
- The locale object to use for localization of messages.
setProperty
public void setProperty(String propertyId,
Object value)
throws org.apache.xerces.xni.parser.XMLConfigurationException
Sets the value of a property. This method is called by the component
manager any time after reset when a property changes value.
Note: Components should silently ignore properties
that do not affect the operation of the component.
- setProperty in interface org.apache.xerces.xni.grammars.XMLGrammarLoader
- setProperty in interface org.apache.xerces.xni.parser.XMLComponent
- setProperty in interface XMLDTDProcessor
propertyId
- The property identifier.value
- The value of the property.
Copyright B) 1999-2005 Apache XML Project. All Rights Reserved.