On Monday, July 30, 2001, at 12:48 PM, Incze Lajos wrote:
<snip>
> ... 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?
the current rules are simple but for rules so simple, they are
surprisingly comprehensive. the price which is paid is that for complex
schema, the number of rules required rises as a permutation of the number
of elements. i'd like to introduce a small number of rules (as small as
possible) which ensure that this rate of rise is reduced.
i like simple rules and i'd like matching patterns as-simple-as-possible -
but i also can see that your suggestion would be extremely powerful. i'd
like to have that too!
so i guess IMHO digester would benefit from a flexible mechanism which
would give users the choice from a set of simple - but easy to learn -
rules which are based on the current format and a sophisticated - but more
complex - set of matching rules that work using some variation of XPATH.
the best of both worlds? just maybe :)
- robert