Tim Larson wrote:
http://marc.theaimsgroup.com/?l=xml-cocoon-cvs&m=107831750602134&w=2 src/java/org/apache/cocoon/matching/MountTableMatcher.java Log: Add an ending slash to the prefix
I just realized this change caused a loss of functionality that I
was planning to use. A mount-table is a pass-through construct:
if no match is found by following the mount-table, then the search
is continued in the sitemap that mounted the mount-table file.
Right: it's "just" a matcher, and as such if no prefix matched sitemap execution continues
A normal map:mount is not pass-through: if no match is found in the
mounted sitemap, then the search is ended.
Right: a sitemap *must* handle a request it is given. If no pipeline is built by a sitemap, a ResourceNotFoundException is raised.
With this change from 2.1.4 behaviour we lose the ability to setup
pass-through behaviour by mapping a sub-sitemap into the same url
space as its parent and letting the parent match what the sub-sitemap
does not match.
?? The use of the mount table doesn't change the <map:mount> semantics, and if the mount occurs, there's no turning back to the parent sitemap.
The change claims:
// Append a '/' at the end of the prefix // this avoids flat uri matching which would cause // exceptions in the sub sitemap! I was not getting exceptions like this in 2.1.4...could anyone
explain in more detail the reasons for this change?
Yep. Carsten (you did this patch)?
<alternate-solution>
We could have a passthru="true" attribute on map:mount's to
turn on pass through behaviour...
</alternate-solution>
The mount table uses the exact same syntax as <map:mount> where no slash is automagically added. This allows mounts to occur in the same directory of the URL space.
So IMO, the right solution is to assume the user has properly written the prefix, and therefore revert this modification.
WDYT?
Sylvain
-- Sylvain Wallez Anyware Technologies http://www.apache.org/~sylvain http://www.anyware-tech.com { XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
