On Sun, 26 Aug 2001, Jason van Zyl wrote:

> Date: Sun, 26 Aug 2001 19:15:29 -0400
> From: Jason van Zyl <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Subject: [digester] dynamic digester via DTD/Schema
>
> Hi,
>
> Has anyone played with making a Digester that works generically from a DTD
> or Schema? Robert, I think you started something yes? It would be very cool
> point a DynamicDigester at a DTD/Schema and not have to worry about the
> making the rules yourself :-)
>

I can see how you'd decide what patterns made sense from a DTD or a
Schema, but how would you decide what rules to fire?  Even if it's a
simple "instantiate an object tree that is isomorphic to the XML
document", you'd still have to decide how to map XML elements to Java
class names, deal with attribute<-->property mismatches, and so on -- to
say nothing of figuring out what method names to fire for SetNextRule
calls ... by that time, you might as well just go ahead and make the
rules.

On the other hand, check out the enhancements from yesterday and today's
commits that did two major things:

* Made Digester a much better XML citizen with regard to namespaces.  In
  addition to the existing behavior of simply matching elements, you can
  make your rules sensitive to particular namespaces now.

* Created a RuleSet abstraction that lets you package the "set up the
  rules" logic into a reusable class, and then easily assemble a
  Digester that processes these RuleSets.  You still have to write the
  rules manually, but you only need to do it once for any reusable set.

> --
>
> jvz.
>
> Jason van Zyl
>

Craig

Reply via email to