You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Markos Charatzas <xa...@forthnet.gr> on 2005/05/20 14:50:31 UTC

[digester] setting parent

Hi there,

Im trying the "set-top-rule" to set the parent of an object, but as far as I 
can see this is only happening at the end element of the child object.

Is it possible to set the parent just after creating the object?

Thanks,
Markos

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: [digester] setting parent

Posted by Markos Charatzas <xa...@forthnet.gr>.
Thanks Simon,

Ill try it and see how it goes.

Regards,
Markos

On Saturday 21 May 2005 01:04, Simon Kitching wrote:
> On Fri, 2005-05-20 at 15:50 +0300, Markos Charatzas wrote:
> > Hi there,
> >
> > Im trying the "set-top-rule" to set the parent of an object, but as far
> > as I can see this is only happening at the end element of the child
> > object.
> >
> > Is it possible to set the parent just after creating the object?
>
> Not with the standard SetTopRule.
>
> I suggest creating your own Rule class. You can just steal the code from
> the existing SetTopRule, but put it in the "begin" method rather than
> the "end" method - I see no reason why that wouldn't work.
>
> If you're using that blasted xmlrules stuff then you'll need to figure
> out how to invoke a custom rule. There's something about
> "programmatically-created-rules" in the xmlrules documentation which is
> probably what you want.
>
> Regards,
>
> Simon
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: [digester] setting parent

Posted by Simon Kitching <sk...@apache.org>.
On Fri, 2005-05-20 at 15:50 +0300, Markos Charatzas wrote:
> Hi there,
> 
> Im trying the "set-top-rule" to set the parent of an object, but as far as I 
> can see this is only happening at the end element of the child object.
> 
> Is it possible to set the parent just after creating the object?

Not with the standard SetTopRule.

I suggest creating your own Rule class. You can just steal the code from
the existing SetTopRule, but put it in the "begin" method rather than
the "end" method - I see no reason why that wouldn't work.

If you're using that blasted xmlrules stuff then you'll need to figure
out how to invoke a custom rule. There's something about
"programmatically-created-rules" in the xmlrules documentation which is
probably what you want.

Regards,

Simon


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org