cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <>
Subject MountTableMatcher
Date Thu, 13 Nov 2003 18:12:15 GMT
I all,

I wrote a little goodie that hopefully will be very helpful to all of 
us: the MountTableMatcher. This is a matcher that manages a "mount 
table", allowing to add subsitemaps to a Cocoon application without 
modifying the main sitemap.

This is especially useful for two purposes:

- to mount external directories into Cocoon (demos, prototypes, 
projects) without having to change the main Cocoon sitemap. This allows 
these mounts to "survive" a update to a more recent version of Cocoon 
(e.g. "cvs update; build clean webapp").

- to mount the _source_ of Cocoon samples instead of their copy placed 
in build/webapp by the build process. This avoids many of the hassles 
related to editing a copy of the sources, often leading to sync problems.

The mount table is an xml file which as a format similar to the 
<map:mount> syntax:
  <mount uri-prefix="foo" src="file://path/to/foo/directory/"/>
  <mount uri-prefix="bar/baz" src="file://path/to/bar-baz/directory/"/>

Usage is straightforward:
<map:match type="mount-table" pattern="path/to/mount-table.xml">
  <map:mount uri-prefix="{uri-prefix}" src="{src}"/>

The main samples sitemap now uses a mount table located at the root of 
the Cocoon directory. It is not present by default (and ignored 
silently), but a "mount-table.xml.sample" is provided that just needs to 
be copied to "mount-table.xml".


Sylvain Wallez                                  Anyware Technologies 
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Orixo, the opensource XML business alliance  -

View raw message