commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Heimann <>
Subject Re: Re: digester 2.0 [WAS Re: [digester] [PROPOSAL] More pattern matching flexibility]
Date Wed, 04 Sep 2002 22:40:30 GMT

On Wed, Sep 04, 2002 at 09:46:56PM +0100, robert burrell donkin wrote:
> On Wednesday, September 4, 2002, at 08:30 PM, Christopher Lenz wrote:
> <snip>
> i'm pretty happy with the way that this is heading but maybe it'd be 
> easier for more people to review these changes and suggest improvements if 
> we had them in cvs. maybe a branch is the right way to go forward. (we can 
> merge back once everyone's happy with the changes.)
> comments?

yes, I think a branch would be good. 

One thing I noticed when looking at the patch: 

Christoph introduced the namespaceURI instance variable to the
digester. The get/set methods for the namespaceURI work now directly
with this variable instead of delegating the call to a Rules

I think the namespace-uri is only relevant for some matchers (for
example SimpleMatcher and ExtendedMatcher). I would like to write a
matcher with namespace support for patterns. The namespace-uri would
not make sense for such a matcher. Maybe we could write the
setNamespaceURI like this to retain backward compatibility:

public void setNamespaceURI(String uri) {
    if (getMatcher() instanceof RulesBase) {
    } else { 
        throw new UnsupportedOperationException();

The same problems appears with the setNamespaceAware method. It's
nonsense to use a matcher with namespace support if the digester
creates a SAXParser that is not namespace aware. Again, for some
Matcher implementations it might be useful to leave the choice to the
user, for others not.


Stefan Heimann       |
Brandensteinstr. 5   |
D-79110 Freiburg     |

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

View raw message