Robert Goene wrote:
Andreas Hartmann wrote:
Robert Goene wrote:
Hi,
I need to retieve the absolute path of the lenya directory in a sitemap.
I cannot use the context:// protocol, because i have to pass the
directory as a parameter. Is there any way i can determine the absolute
path?
Take a look at the RealPathModule:
http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/components/modules/input/RealPathModule.html
Sounds nice! Cocoon would suprise me if there wasn't a module for this.
How do i use the module? Something like
{realpath://lenya/pubs/{page-envelope:publication-id}/work/lucene/index}
The javadocs on the website seem to be outdated. That's from 2.1.8-dev:
/*
* Note: the primary use for this is to support external code that wants a
* filesystem path. For example, The FOP 0.20.x serializer doesn't like
* relative image paths, and doesn't understand Cocoon URLs (context:, cocoon:
* etc). So we pass the *2fo.xsl stylesheet a real filesystem path to where we
* keep our images:
*
* <map:transform src="skins/{forrest:skin}/xslt/fo/document2fo.xsl">
* <map:parameter name="basedir" value="{realpath:resources}/"/>
* </map:transform>
*
* And then prepend this to all image paths:
* ...
* <xsl:param name="basedir" select="''"/>
* ...
* <xsl:template match="img">
* <xsl:variable name="imgpath" select="concat($basedir, @src)"/>
* <fo:external-graphic src="{$imgpath}" ...
* ...
* </xsl:template>
*/
-- Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]