[EMAIL PROTECTED] wrote:
> [...]
>
> So I believe we have to go with the first approach, because the above
> information is already available in parser configurations.

I'm not convinced that the first approach is the way to go.
Yes, the user will need to set things like the error handler,
entity resolver, and existing grammar cache in the case where
the grammar needs information from other grammars. However, I
don't yet see how this needs methods on the existing parser
configuration interfaces.

> The next question is: which configuration? A new configuration? I always
> thought it's not necessary. Why can't we have a parseGrammar method on the
> standard configuration? The standard configuration already parses grammars.
> Now we just expose this functionality by adding a new method.

I'd rather have a new interface (but I wouldn't call it
"configuration").

I personally prefer associating grammar loading with the
grammar classes themselves. The very nature of grammars is
so different that I think it may be hard to come up with
a single generic way to load grammars that works for all
types of grammars.

> We can have a GrammarParser component in the configuration, and make it an
> internal property. When parseGrammar() is called on the configuration, it
> queries the property, and calls proper method to parse the grammar.
> Validators can also use this property to parse grammars, instead of calling
> XSDHandler etc. directly.

But what about new grammar types? How will the property
know how to load that? The answer is that it won't unless 
the configuration is built with a version of the component 
that understands (and knows how to load) those types of 
grammars. So... since the user has to control the config
anyway, I'm figuring that it's easier all around to move
the grammar loading outside of the parser configuration
and grammar cache.

-- 
Andy Clark * [EMAIL PROTECTED]

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

Reply via email to