*/
public Grammar preparseGrammar(String type, XMLInputSource
is) throws XNIException, IOException {
if (fLoaders.containsKey(type)) {
XMLGrammarLoaderContainer xglc = (XMLGrammarLoaderContainer) fLoaders.get(type);
XMLGrammarLoader gl = xglc.loader;
if (xglc.modCount != fModCount) {
// make sure gl's been set up with all the "basic" properties:
gl.setProperty(SYMBOL_TABLE, fSymbolTable);
gl.setProperty(ENTITY_RESOLVER, fEntityResolver);
gl.setProperty(ERROR_REPORTER, fErrorReporter);
// potentially, not all will support this one...
if (fGrammarPool != null) {
try {
gl.setProperty(GRAMMAR_POOL, fGrammarPool);
} catch(Exception e) {
// too bad...
}
}
xglc.modCount = fModCount;
}
return gl.loadGrammar(is);
}
return null;
} // preparseGrammar(String, XMLInputSource): Grammar