I would like to propose to change the default behaviour of the
resource-exists selector re testing the path relative to the sitemap from it's being called.
Let me give an example:
Let's say we have a sitemap and from there another sub-sitemap mounted within some directory,
context (e.g. cocoon) | +-- sitemap.xmap | +-- foo | +-- sub-sitemap.xmap | +-- bar | +-- file1.xml | +-- file2.xml
Currently to test files from within the *sub-sitemap* requires the following sitemap snippet
<map:select type="resource-exists"> <map:when test="foo/bar/file1.xml">
but wouldn't it make more sense to have
<map:select type="resource-exists"> <map:when test="bar/file1.xml">
which means the path is relative to the actual sitemap? Or am I overlooking something?
Sub-sitemaps can be anywhere and not necessarily work with a sub-dir scenario in mind. Forrest is a good example of this, as we use several subsitemaps, all in the same dir.
What IMHO would make more sense, instead, is something like:
<map:select type="resource-exists" base="foo/"> <map:when test="bar/file1.xml"> ....
--
Nicola Ken Barozzi [EMAIL PROTECTED]
- verba volant, scripta manent -
(discussions get forgotten, just code remains)
---------------------------------------------------------------------