commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Horn, Lutz" <Lutz.H...@FIZ-Karlsruhe.DE>
Subject Re: Strange behaviour with xmlrules
Date Wed, 18 Jun 2003 14:18:34 GMT

* José Antonio Pérez Testa []
> I think that the problem is in the xml structure and the fact 
> that the 
> same token 'baz' creates the object and calls the method.
> I'm doing a very similar processing whith the following rules:
> <digester-rules>
>   <object-create-rule pattern="foo" classname="MyFoo"/>
>   <pattern value="foo/bar">
>     <object-create-rule classname="MyBaz"/>
>     <call-method-rule pattern="baz" methodname="setContent" 
> paramcount="0"/>
>     <set-next-method methodname="addBaz"/>
>   </pattern>
> </digester-rules>

This is what I tried: <call-method-rule> first, <set-next-method>
second. As I wrote, this calls addBaz() of the MyFoo instance before
setContent() of the MyBaz instance is called. So this exactly is my

> If there is only one 'baz' in each 'bar' this should work!

But even if there were more than one 'baz' in each 'bar' a new
MyBaz schould be created, filled, and added to MyFoo for each of them
using your rule. Correct?


View raw message