Login
Quick Search

fn:collection with regular expression

by wolf at 26-8-2008 14:24; Wiki ID: RegexCollectionSearch

People often use the collection hierarchy to encode information, e.g. /db/year/month. Now, imagine you need to search all collections corresponding to the years 2001 to 2003. If the year isn't encoded in the XML docs as well, you need to use the path information. For example:

(collection("/db/2001"), collection("/db/2002"), collection("/db/2003"))/*

This works, but is not very convenient. It would thus be nice to have an extension function which behaves like fncollection, but accepts a regular expression against which the collection paths are matched.

Links
Latest Posts
AtomicWiki 0.4