On Mon, 30 Jul 2001, Incze Lajos wrote:

> On Sun, Jul 29, 2001 at 09:18:04PM +0100, robert burrell donkin wrote:
> > On Sunday, July 29, 2001, at 07:02 PM, Scott Sanders wrote:
> > 
> > > Bring it on!
> > 
> > the way that matching rules work at the moment are a concern to me.
> > (maybe i don't understand then well enough - or maybe they need enhancing.
> >   i'm going to write as if i understand them but i'm sure you'll set me 
> > right where i don't)
> > 
> > the current way that matching rules work means that the number of rules 
> > required rises almost exponentially for complex schema.
> > 
> > you can only wildcard prefixes (*/a but not a/*). this means that you end 
> > up having a rule for every child for a parent that adds child in a certain 
> 
> ... etc. Ithink that in digester it would be a good idea to change the
> JSP-ish matching rules to XPATH expressions. At the same time digester
> could use JDOM or DOM4J (they have esstially the same XPATH engine).
> XPATH was designed to walk through an XML graph, so you can express
> as complex or as simple rules as you want. both JDOM and DOM4j gives
> you a pretty convenient (I mean collections) interface to the
> document. Comments?
> 

I don't have a problem with thinking about different rule matching
syntaxes (it would be simple to use regular expressions, for example).  
But, fundamentally, the current Digester is a wrapper around SAX, not
around a DOM tree of any sort.

Creating a variant of Digester that can walk an existing DOM/JDOM/DOM4J
tree is possible, but was never an itch I needed to scratch -- the primary
initial use case is one-time scanning of "configuration" type files that
get mapped into Java object graphs.

> incze
> 

Craig


Reply via email to