On Saturday, August 18, 2001, at 04:19 AM, Jason van Zyl wrote:

> Hi,
>
> This is primarily directed at Scott, as he made antgump and knows the
> Digester code well, but if anyone has a few spare moments this weekend and
> what's to help use the Digester to convert Gump's XML descriptors into 
> Java
> objects some help would be highly appreciated :-)
>
> I have the start a Java version of Gump, but I could work on the Velocity
> templates if someone else can finish the the Digesters. Anyone interested
> and have a few hours this weekend?

hi jason

i've actually been having a look at generating digester rulesets and beans 
from xml-schema (along the lines you suggest earlier).
i have an extended set of pattern matching rules (which now work pretty 
well against more complex schema) and an ant setup that's working in terms 
of using digester to create the initial rules for the schema->bootstrap 
object model parsing. i had hoped to be generating basic beans with 
digester rulesets this weekend but unfortunately i got tied up with an 
upgrade that went bad :(

i'm going to need some test schema to run against so maybe i'll have a go 
at generating the ones you need. even if i finish second, it'd be 
interested to compare notes :)

i'm not really up to speed on gump. are the schema are the ones in 
jakarta-alexandria/src/xml ?

BTW i've found that creating a rule implementation that just prints out 
debugging information is really useful for debugging pattern matching 
rulesets - something like

class TestRule extends Rule
{
     protected String msg;

     TestRule(Digester digester,String msg)
     {
         super(digester);
         this.msg=msg;
         System.out.println(msg + " CREATED");
     }

     public void begin(org.xml.sax.Attributes attributes)
     {
         System.out.println(msg + " BEGIN");
     }

     public void body(java.lang.String text)
     {
         System.out.println(msg + " BODY " + text);
     }

     public void end()
     {
         System.out.println(msg + " END");
     }

     public void finish()
     {
         System.out.println(msg + " FINISH");
     }
}

- robert

Reply via email to