commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tal Dayan" <...@zapta.com>
Subject RE: [digester] relative patterns
Date Tue, 13 Nov 2001 19:14:05 GMT
Hello,


It looks like Digester accepts built in rules only with absolute patterns
such as

    digester.addSomeRule("aa"
    digester.addSomeRule("aa/bb/cc"
    digester.addSomeRule("aa/bb"

which requires some work when moving things around the hierarchy.

How about adding support for relative patterns like (very rough syntax):

    digester.setBase("/aa")
    digester.addSomeRule("."            --> /aa
    digester.addSomeRule("./bb/cc"      --> /aa/bb/cc
    digester.addSomeRule("!"            --> /aa/bb/cc  (the previous path)
    digester.addSomeRule("!/../dd"      --> /aa/bb/dd

This will affect only the creation of the rules and will not add overhead to
the actual parsing of the XML document.

Tal



--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message