commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Kitching <>
Subject Re: Questions on Namespace-aware Rules
Date Wed, 26 Mar 2003 06:29:23 GMT
On Wed, 2003-03-26 at 17:26, Graham Lea wrote:

> One: Why have the non-namespace aware methods in Rule been deprecated?

Well, technically the difference between the old and new begin/body/end
methods is not namespaces, but the fact that information about the name
of the current element is now provided to these methods. The name of an
element  of course is in two parts: the namespace and the element's
"local" name.

> (b) that I don't have to if I don't want to, and that it's enough to 
> just add the new parameters and ignore them.

Yep. Just changing the prototype of your existing rules' begin and end
methods should be all that is needed. Most rules don't care what the
current node's name is when triggered, but I believe someone had a
reason for requesting this a few months ago.

As an aside, the namespace handling in the pattern-matching is pretty
hacky, but very fast; it gives only some of the benefits of proper
namespace handling, but does it for almost no performance hit.



View raw message