| java.lang.Object org.apache.xerces.parsers.XMLGrammarPreparser
XMLGrammarPreparser | public class XMLGrammarPreparser (Code) | | This class provides an easy way for a user to preparse grammars
of various types. By default, it knows how to preparse external
DTD's and schemas; it provides an easy way for user applications to
register classes that know how to parse additional grammar types.
By default, it does no grammar caching; but it provides ways for
user applications to do so.
author: Neil Graham, IBM version: $Id: XMLGrammarPreparser.java 521449 2007-03-22 20:35:42Z mrglavas $ |
Inner Class :static class XMLGrammarLoaderContainer | |
ENTITY_RESOLVER | final protected static String ENTITY_RESOLVER(Code) | | Property identifier: entity resolver.
|
ERROR_HANDLER | final protected static String ERROR_HANDLER(Code) | | Property identifier: error handler.
|
ERROR_REPORTER | final protected static String ERROR_REPORTER(Code) | | Property identifier: error reporter.
|
GRAMMAR_POOL | final protected static String GRAMMAR_POOL(Code) | | Property identifier: grammar pool .
|
SYMBOL_TABLE | final protected static String SYMBOL_TABLE(Code) | | Property identifier: symbol table.
|
XMLGrammarPreparser | public XMLGrammarPreparser()(Code) | | Default constructor.
|
XMLGrammarPreparser | public XMLGrammarPreparser(SymbolTable symbolTable)(Code) | | Constructs a preparser using the specified symbol table.
Parameters: symbolTable - The symbol table to use. |
getLocale | public Locale getLocale()(Code) | | Return the Locale the XMLGrammarLoader is using.
|
preparseGrammar | public Grammar preparseGrammar(String type, XMLInputSource is) throws XNIException, IOException(Code) | | Parse a grammar from a location identified by an
XMLInputSource.
This method also adds this grammar to the XMLGrammarPool
Parameters: type - The type of the grammar to be constructed Parameters: is - The XMLInputSource containing this grammar'sinformationIf a URI is included in the systemId field, the parser will not expand this URI or make itavailable to the EntityResolver The newly created Grammar . exception: XNIException - thrown on an error in grammarconstruction exception: IOException - thrown if an error is encounteredin reading the file |
setEntityResolver | public void setEntityResolver(XMLEntityResolver entityResolver)(Code) | | Sets the entity resolver.
Parameters: entityResolver - The new entity resolver. |
setErrorHandler | public void setErrorHandler(XMLErrorHandler errorHandler)(Code) | | Sets the error handler.
Parameters: errorHandler - The error handler. |
setFeature | public void setFeature(String featureId, boolean value)(Code) | | |
setGrammarPool | public void setGrammarPool(XMLGrammarPool grammarPool)(Code) | | Sets the grammar pool.
Parameters: grammarPool - The new grammar pool. |
setLocale | public void setLocale(Locale locale)(Code) | | Set the locale to use for messages.
Parameters: locale - The locale object to use for localization of messages. exception: XNIException - Thrown if the parser does not support thespecified locale. |
|
|