forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ross Gardler <>
Subject Getting locationmap working
Date Thu, 17 Feb 2005 17:31:32 GMT
I need the locationmap on a project in a couple of months time. I've 
tried to get the code in SVN working, but failed as it requires a little 
more knowledge of Cocoon than I currently have, so a little help please.

Here's what I have done (based on ):

Added the following to forrest-core.xconf:

       logger="core.modules.mapper" name="lm">
       <!-- FIXME: hard coded path - how do we get this from the 
property @project.home@/@project.locationmap@ -->
       <file src="D:\openSource\forrest\docs-author\location.xmap"/>

Added "lm" to the schemes element of the linkrewriter config and added 
the locationmapmodule to it:

<map:transformer name="linkrewriter" 
         <link-attrs>href src</link-attrs>
         <schemes>site ext lm</schemes>

         <input-module name="lm">

Added a test matcher to sitemap.xmap:

<map:match pattern="testingLocationMap/**.xml">
   <map:generate src="{project:content.xdocs}/{1}.xml"/>
   <map:transform type="linkrewriter"/>
   <map:serialize type="xml"/>

Created a locationmap.xml file which contains the followin link:


Created a locationmap.xmap file with the following locator (the 
components section is identical to that in the mail linked to above):

   <locator base=".">
     <match pattern="**.html">
       <match pattern="plugin/**.html">
         <location src="plugindir/{1}.html" />
       <location src="{1}.html" />

(the location is wrong, I just want to see the link being rewritten at 
this stage)

I can retrieve the file with no problem and I know the locationmap is 
being processed. However, no match is made and so no link rewriting is 
done. I've looked at what is going on inside the LocationMapModule, it 
is getting "plugin/org.apache.forrest.plugin.PDF-output/index.html" as 
the hint, but it is not matching the pattern "**.html". I even made the 
pattern the same as the hint, but still no match.

Any idea what I am doing wrong?


View raw message