private void initGrammarPool(ASModelImpl currModel) {
// put all the grammars in fAbstractSchema into the grammar pool.
// REVISIT: straighten this out when grammar caching's properly implemented!
if(!(fGrammarPool instanceof XMLGrammarPoolImpl)) return;
XMLGrammarPoolImpl poolImpl = (XMLGrammarPoolImpl)fGrammarPool;
SchemaGrammar grammar = null;
if((grammar = currModel.getGrammar()) != null) {
String tns = grammar.getTargetNamespace();
poolImpl.putGrammarNS(tns, grammar);
}
Vector modelStore = currModel.getInternalASModels();
for (int i = 0; i < modelStore.size(); i++) {
initGrammarPool((ASModelImpl)modelStore.elementAt(i));
}