commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simone Tripodi (JIRA)" <>
Subject [jira] [Commented] (DIGESTER-95) [digester][PATCH] Support for evaluating a predicate when determining if a rule is valid for a given element
Date Mon, 27 Jun 2011 00:51:47 GMT


Simone Tripodi commented on DIGESTER-95:

Very interesting idea indeed!
In Digester3 I modified the {{Rules}} interface in order to get in the {{match()}} method
as input also the current element {{name}} and the {{attributes}}, so instead of modifying
the Digester core code, like in the provided patch, that feature could be provided in a custom
{{Rules}} implementation.
See [r1139976|]

> [digester][PATCH] Support for evaluating a predicate when determining if a rule is valid
for a given element
> ------------------------------------------------------------------------------------------------------------
>                 Key: DIGESTER-95
>                 URL:
>             Project: Commons Digester
>          Issue Type: Improvement
>         Environment: Operating System: All
> Platform: All
>            Reporter: Marcus Crafter
>            Priority: Minor
>         Attachments: digester.patch, digester.patch,
> Hi There,
> Hope all is going well.
> Attached is a patch that adds support for evaluating a Commons Collections
> Predicate object when matching rules to elements, rather than relying on string
> comparison of the elements path.
> This lets one write an arbitrary Predicate implementation (associated with a
> rule) that can check details from the elements name, namespace and attributes
> before notifying digester that the particular rule matches the element node
> being tested.
> I've tested this enhancement to perform attribute value matching, etc, but it
> should open up the rule evaluation section of digester to allow any arbitrary
> comparison (given enough context information).
> I'm definitely a digester novice, but I couldn't see this functionality
> beforehand - I'm happy to change any/all of the patch if there's a better way.
> Looking forward to your comments.
> Cheers,
> Marcus

This message is automatically generated by JIRA.
For more information on JIRA, see:


View raw message