Hi folks,

As it currently stands, there are two ways to do grammar preparsing in
Xerces--you can use DOM 3's DOMASBuilder and you can use the
XMLGrammarCachingConfiguration in our org.apache.xerces.parsers package.
But it seems to me that grammar preparsing is analogous in many ways to
pull parsing.  Our pull parsing functionality is part of XNI--through the
XMLPullParserConfiguration in the xni.parsers package.  So I think we
should have an XMLGrammarCachingConfiguration in the xni.grammars package,
so that preparsing functionality can be exposed in an
implementation-independent way.

On this new interface I'd like to put clearGrammarPool(), lockGrammarPool
(), unlockGrammarPool(), and a couple of parseGrammar(String type, x)
methods where x is either a URI or an XMLInputSource.  I could live without
the first three, but I think the last two at least are critical.  I guess a
parseGrammar(XMLGrammarDescription) might also make sense.

I think it might also be nice to put lock, unlock and clear methods on the
XMLGrammarPool interface itself; it would certainly make our implementation
easier if we could assume all grammar pools support these useful and easy
features.

If we had this, then our current XMLGrammarCachingConfiguration would have
something to implement, and could change its name appropriately.

All thoughts and comments greatly appreciated!

Cheers,
Neil
Neil Graham
XML Parser Development
IBM Toronto Lab
Phone:  905-413-3519, T/L 969-3519
E-mail:  [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to