org.apache.xerces.xni.grammars
Interface XMLGrammarLoader
public interface XMLGrammarLoader
The intention of this interface is to provide a generic means
by which Grammar objects may be created without parsing instance
documents. Implementations of this interface will know how to load
specific types of grammars (e.g., DTD's or schemas); a wrapper
will be provided for user applications to interact with these implementations.
Version:
- Neil Graham, IBM
getEntityResolver
public XMLEntityResolver getEntityResolver()
Returns the registered entity resolver.
getErrorHandler
public XMLErrorHandler getErrorHandler()
Returns the registered error handler.
getLocale
public Locale getLocale()
Return the Locale the XMLGrammarLoader is using.
getRecognizedFeatures
public String[] getRecognizedFeatures()
Returns a list of feature identifiers that are recognized by
this XMLGrammarLoader. This method may return null if no features
are recognized.
getRecognizedProperties
public String[] getRecognizedProperties()
Returns a list of property identifiers that are recognized by
this XMLGrammarLoader. This method may return null if no properties
are recognized.
loadGrammar
public Grammar loadGrammar(XMLInputSource source)
throws IOException,
XNIException
Returns a Grammar object by parsing the contents of the
entity pointed to by source.
source
- the location of the entity which forms
the starting point of the grammar to be constructed.
setEntityResolver
public void setEntityResolver(XMLEntityResolver entityResolver)
Sets the entity resolver.
entityResolver
- The new entity resolver.
setErrorHandler
public void setErrorHandler(XMLErrorHandler errorHandler)
Sets the error handler.
errorHandler
- The error handler.
setFeature
public void setFeature(String featureId,
boolean state)
throws XMLConfigurationException
Sets the state of a feature.
featureId
- The feature identifier.state
- The state of the feature.
XMLConfigurationException
- Thrown when a feature is not
recognized or cannot be set.
setLocale
public void setLocale(Locale locale)
Set the locale to use for messages.
locale
- The locale object to use for localization of messages.
setProperty
public void setProperty(String propertyId,
Object state)
throws XMLConfigurationException
Sets the state of a property.
propertyId
- The property identifier.state
- The state of the property.
XMLConfigurationException
- Thrown when a property is not
recognized or cannot be set.
Copyright B) 1999-2004 Apache XML Project. All Rights Reserved.