Quite some time ago Unico created a Locationmap module for Forrest. This allows us to specify where the source file for a request is located independently of the client request URL. this excellent code has sat in our SVN for far too long, waiting for someone with a strong enough itch to make real use of it. With the release of 0.7 and therefore the start of 0.8 development it has come out of hiding and is now enabled in our core. It is a key part of integrating repositories and CMSs such as Slide, Daisy and Lenya.

The Locationmap code [1] reuses code from Cocoon rather than starting from scratch. We now need to enhance the code to allow the mounting of sub-locationmaps in the same way that Cocoon can mount sub-sitemaps. We are hoping that this can be done through a simple reuse of Cocoon code. Unfortunately, nobody in Forrest knows the insides of Cocoon well enough at this time so it would seem now is time for some of us to learn...

A locationmap consists of a number of matchers, for example:

<match pattern="remoteDemo/**.xml">
<location src="http://svn.apache.org/repos/asf/forrest/trunk/site-author/content/xdocs/{1}.xml"; />
</match>

For a complete locationmap file see
http://svn.apache.org/viewcvs.cgi/*checkout*/forrest/trunk/site-author/content/xdocs/docs_0_80/locationmap.xml?rev=210059

The map is built by the build(...) method in org.apache.forrest.locationmap.lm.LocationMap (see http://svn.apache.org/viewcvs.cgi/forrest/trunk/main/java/org/apache/forrest/locationmap/lm/LocationMap.java?view=markup )

As can be seen in this code Unico reused much of the sitemap code from Cocoon. My question is, can we also leverage the <map:mount...> code? Any pointers as to how to do this would be greatly appreciated.

[1] Locationmap Code http://svn.apache.org/viewcvs.cgi/forrest/trunk/main/java/org/apache/forrest/locationmap/?rev=210090

Ross


Reply via email to