| From | Sent On | Attachments |
|---|---|---|
| Sjur Moshagen | Oct 31, 2006 6:05 am | |
| Tim Williams | Oct 31, 2006 7:05 am | |
| Thorsten Scherler | Oct 31, 2006 7:23 am | |
| Tim Williams | Oct 31, 2006 7:38 am | |
| Thorsten Scherler | Oct 31, 2006 8:02 am | |
| David Crossley | Nov 1, 2006 2:33 pm |
| Subject: | Re: LM properties lookup for JTidy | |
|---|---|---|
| From: | Tim Williams (will...@gmail.com) | |
| Date: | Oct 31, 2006 7:05:08 am | |
| List: | org.apache.forrest.dev | |
On 10/31/06, Sjur Moshagen <sju...@mac.com> wrote:
Hello all,
The main sitemap at FORREST_HOME/main/webapp/sitemap.xmap contains the following snippet around line 30:
<map:generator name="html" src="org.apache.cocoon.generation.HTMLGenerator"> <jtidy-config>WEB-INF/jtidy.properties</jtidy-config> </map:generator>
I would like to augment this with a LM lookup, to facilitate project- specific jtidy config. As it is now, one needs to change e.g. the file encoding in the file FORREST_HOME/main/webapp/WEB-INF/ jtidy.properties. I would like to have Forrest look in a couple of different places:
PROJECT_HOME/src/documentation/WEB-INF/ FORREST_HOME/webapp/WEB-INF/
This way, it is easy for any single project to change whatever jtidy settings is needed (or provide more) without needing to change any of the Forrest code.
The problem:
I don't grasp how I should formulate what I want. I guess there need to be two pieces in place:
#1 - replace the reference in the above sitemap snippet with a LM lookup #2 - resolve that LM lookup to one of the two locations mentioned
But what does #1 look like? And where should #2 be stored and called?
Any hints appreciated, Sjur
Hi Sjur, Try the locationmap protocol. It seems to me that it should work for what you want.
e.g. <map:generator name="html" src="org.apache.cocoon.generation.HTMLGenerator"> <jtidy-config>lm://jtidy-config</jtidy-config> </map:generator>
then add a locationmap entry for
<match pattern="jtidy-config"> ...various locations.... </match>
--tim





