[EMAIL PROTECTED] wrote:
> their key to getting grammar objects they can use.  So let's not have it
> buried in the util package--where there isn't really anything users would
> want to play with--and let it live in parsers, with all our other
> implementation-level stuff that applications are invited to interact with.

Fair enough.

> I don't see a convincing argument for a grammar cache at all.

There's nothing saying we absolutely need it. It would just 
be convenient because we will need an implementation of 
XMLGrammarPool internally. And if we need an implementation,
then other people might need one of general use as well.

> We've already got a large number of properties; I'd love to see us avoid
> another one.  I think it's entirely fair for a validator to have to know
> how to interact with a grammar loader for its particular type of grammar.

What about the case where the application sets the grammar
cache? The validators must have a way to access this cache.
In the case where the grammar needed is not in the cache,
then it is perfectly valid to require the validator to know
how to load the grammar from a specific loader implementation.
However, they should still have a way of accessing the cache
if it's available.

We could always implement the validators to check for the
property but be able to work in the absence of a set cache.
Just because a component asks for a feature/property does
not mean that the configuration must always support those
features/properties.

> Our grammar loading implementation has a mapping between grammar URI's and
> grammar loader implementations.  (it's a little factory if you will).  We
> then use class.forName (or Andy's ObjectFactory) to attempt to construct
> grammar loaders given the kinds of grammars the user requests--thus no
> nasty non-layering!  And this is very extensible:  to add a new grammar
> preparsing functionality, just subclass this implementation and add a new
> mapping!

Are you suggesting that we basically use the Jar services
method (via the ObjectFactory class) for locating instances?
This has the downside that all of the instances returned are
of the same type within the same VM. I can envision a system
where different caches are given to different parsers within
the same VM.

> There's my $0.02.

I've added my 2 yen. ;)

-- 
Andy Clark * [EMAIL PROTECTED]

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

Reply via email to