commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject RE: [Digester 1.4.1] <set-next-rule /> question
Date Mon, 24 Mar 2003 14:45:38 GMT
It appears that the method (defined in set-next-rule) is called immediately
after the object (defined in object-create-rule) is instantiated.  This
means setLSID is called after setMarker.  Don't know why.  I agree that it
seems logical the setMarker should be called after all of the methods,
attribute setters, etc are called.

-----Original Message-----
From: Martin Leboeuf []
Sent: Monday, March 24, 2003 8:40 AM
To: commons-user
Subject: [Digester 1.4.1] <set-next-rule /> question

Hi !

I am using Digester 1.4.1 to parse xml documents. I am defining my rules 
in an xml document instead of programmatically. Based on my 
understanding of the documentation, the method defined in the 
<set-next-rule> element is typically used to insert a completed bean 
into its parent. Therefore, it should be called when the bean is 
completed i.e. when other method calls defined on that bean have been 
performed. Here is an excerpt of my xml rules file:

   <pattern value="batch">
     <object-create-rule classname="my.package.xml.XMLMarker"/>
     <pattern value="snps/snp">
       <object-create-rule classname="my.package.Marker"/>
       <call-method-rule methodname="setLSID" paramcount="1"/>
       <call-param-rule attrname="lsid" paramnumber="0"/>
       <set-next-rule methodname="setMarker"/>

When the setMarker method is called on the XMLMarker object, the setLSID 
method has not yet been called on the Marker object. As I just 
explained, my expectation was that it would have been. What am I 



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message