commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Heimann <m...@stefanheimann.net>
Subject [Digester] Namespacesupport, Patch
Date Sun, 01 Sep 2002 14:08:09 GMT
Hi all,

as posted earlier, here is the patch that adds support for rules that
can match element in different namespaces. For example, its possible
the have a pattern ``/foo:a/bar:b'' that matches

<foo:a>
  <bar:b/>
</foo:a>

but not

<foo:a>
  <foo:b/>
</foo:a>

You would setup the rule like that:

Rules rules = digester.getRules();
rules.registerNamespacePrefix("foo", "http://www.foo.com");
rules.registerNamespacePrefix("bar", "http://www.bar.com");
rules.addRule("/foo:a/bar:b", new MyRule());


I have updated the matching behaviour of RulesBase and
ExtendedBaseRules. The matching semantic did not change, there are
only some more possibilities.

All unit-tests are running.

Bye,
  Stefan

-- 
Stefan Heimann       | http://www.stefanheimann.net
Brandensteinstr. 5   | http://www.cantaloop.org
D-79110 Freiburg     | http://cvsshell.sourceforge.net

Mime
View raw message