cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Daniel <>
Subject Re: [C2.2] Sitemap: Block Context Path
Date Fri, 10 Oct 2008 13:23:39 GMT
On 06.10.2008, at 14:05, Matthias Müller wrote:

> what's the easiest way to get the context path of the current block  
> (the project root)?
> i want to to use a parameter $myContextPath in my sitemap to work in  
> a jx template, like this:
> <map:generate type="jx" src="resource/internal/fonts/fop-config.jxt">
>      <map:parameter name="myContextPath" value="context://"/>
> </map:generate>

With these input modules

<map:transform src="demo/welcome.xslt">
	<map:parameter name="servlet" value="{servlet:}"/>
	<map:parameter name="block-path" value="{block-path:}"/>
	<map:parameter name="realpath" value="{realpath:/}"/>
	<map:parameter name="contextpath" value="{contextpath:}"/>

I get following output when I run the block with mvn jetty:run:

servlet: /maintenance
block-path: /maintenance
realpath: file:/Users/alex/dev/cocoon/spikes/maintenance/./src/main/ 
contextpath: ///Users/alex/dev/cocoon/spikes/maintenance/./src/main/ 

Probably contextpath is what you are looking for.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message