commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kartik Asatkar <krakh...@gmail.com>
Subject Re: [Digester] Is capability to set object property based on attribute value comparison present?
Date Thu, 03 Feb 2005 06:25:21 GMT
Wouldn't addition of these capabilities to Digester be of use to many users?

Cause if you are looking to specify all rules in xml, then due absence
of these some rules would have to be coded in Java and added using
include tag.

Or are these and more to be added in v2.0?

Regards,
Kartik


On Thu, 03 Feb 2005 17:33:26 +1300, Simon Kitching wrote:
> On Wed, 2005-02-02 at 17:50 -0600, Kartik Asatkar wrote:
> > Hi,
> >
> > This is regarding Digester v1.6
> >
> > Is it possible to set an object property with value taken from body or
> > a particular attribute based on comparison of another attribute value
> > (this needs to be specified in the xml rule file)?
> >
> > Something like -
> >     - if attribute X value matches Y then set parameter N to body of element
> >     - if attribute X value matches Y then set parameter N to value of
> > attribute Z
> 
> No such functionality is built in to digester. However it wouldn't be
> too hard to write a custom Rule to do this. Writing custom Rule classes
> is really pretty easy....
> 
> 
> >
> > I need to be able to do this in the xml rule file?
> 
> Accessing custom rule classes from xmlrules is complicated. In addition
> to creating your Rule, you need to subclass the
>    o.a.c.d.xmlrules.DigesterRuleParser
> class to add a factory that can instantiate and configure your rule.

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


Mime
View raw message