commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Drach <Steve.Dr...@sun.com>
Subject [digester] RFE - Digester.startElement could use a callback
Date Wed, 15 Oct 2003 17:38:54 GMT
Near the end of the startElement method, we see this:

        List rules = getRules().match(namespaceURI, match);
        if ((rules != null) && (rules.size() > 0)) {
          ...
        } else {
            if (debug) {
                log.debug("  No rules found matching '" + match + "'.");
            }
        }

It would be nice if I could register an interface implementation that
contains a method that gets invoked in the else clause, so I can know
if no rules match the name.  That way I can put out an error message if
I want.  Somthing like this:


        } else {
            callback.notify(name);
            if (debug) {
                log.debug("  No rules found matching '" + match + "'.");
            }
        }

Of course, callback is not a very good name, but you get the idea.

---------------------------------------------------------------------
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