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:}"/>
</map:transform>

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/ resources/COB-INF/ contextpath: ///Users/alex/dev/cocoon/spikes/maintenance/./src/main/ resources/COB-INF/

Probably contextpath is what you are looking for.

Alex



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to