This LinkRewriterTransformer demo is what I used for primary testing. It
implements a 'linkmap' as described in this Forrest RT:
http://marc.theaimsgroup.com/?l=forrest-dev&m=103444028129281&w=2
Specifically, the file linkmap.xml is first absolutized, then relativized, then
used to resolve links like .
To install:
1) run 'build.sh webapp-local'
2) copy this directory into build/cocoon/webapp/samples/
3) Edit build/cocoon/webapp/WEB-INF/cocoon.xconf, and add the following section
inside /cocoon/input-modules:
true/site//@href
4) Restart your webserver, and request http://localhost:8080/cocoon/samples/linkrewriter-sitedemo/welcome
You ought to get the following XML back:
linkmap:/site/index/@href
site:index
site:faq/how_can_I_help
The href's are the things that were rewritten.
Then add an arbitrary path before the /welcome, eg
http://localhost:8080/cocoon/samples/linkrewriter-sitedemo/foo/bar/welcome
You should get back 'relativized' links:
linkmap:/site/index/@href
site:index
site:faq/how_can_I_help
Change the @src in line 14 to '{src}' to make the first one also be relative.