Author: rgardler Date: Mon Jun 2 14:09:42 2008 New Revision: 662565 URL: http://svn.apache.org/viewvc?rev=662565&view=rev Log: Document how to make plugins work if they use a fixed URL space. Modified: forrest/trunk/whiteboard/multipleSites/master/src/documentation/content/xdocs/index.xml Modified: forrest/trunk/whiteboard/multipleSites/master/src/documentation/content/xdocs/index.xml URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/multipleSites/master/src/documentation/content/xdocs/index.xml?rev=662565&r1=662564&r2=662565&view=diff ============================================================================== --- forrest/trunk/whiteboard/multipleSites/master/src/documentation/content/xdocs/index.xml (original) +++ forrest/trunk/whiteboard/multipleSites/master/src/documentation/content/xdocs/index.xml Mon Jun 2 14:09:42 2008 @@ -247,6 +247,77 @@
+ Enabling Plugins + +

Most plugins will work without any further configuration. However, + some plugins use a specific URL space to indicate a required + processing step. For example, the projectInfo plugin uses + **/docs/**/* for its use case processing. In these + instances you will need to add matches to your locationmap.

+ +

It is outside the scope of this document to document all + plugins here. However, we will provide an example using the + projectInfo plugin.

+ +

First of all we need to examine the plugin code (or if you + are lucky documentation) to see what matches are used to drive + the processing we want. In the input.xmap we find:

+ + + + + + + + + ]]> + + The above sitemap snippet was not present when I started + writing this documentation. I had to add it as the plugin had + not been designed to work with multiple sites. Previously the + pattern was limited to "docs/user/useCases/**.xml". By adding + the "**" prefix we allow the plugin to work with sites mounted + in a subdirectory. + +

The generator for "cocoon:/docs/user/useCases/{1}.{2}.source.xml" + is handled by the match:

+ + + + + + ]]> + +

So now we need to look in the locationmap for a + match for "{lm:project.useCases.{2}}". What we find + is:

+ + + + + ]]> + +

We can see from the above that a request for a resource + at "subsite/docs/user/useCases/simpleUseCase.xml" will + result in a locationmap lookup for + "project.useCases.subsite.simpleUseCase". The default match + in thje projectInfo will look for that in the master site + useCases directory. So we need to add a locationmap match to + the master site that will catch the subsite matches, as + follows:

+ + + + + ]]> + +
+ +
Known Problems