cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Quenot <...@anyware-tech.com>
Subject Re: Resources from within XSLT
Date Mon, 20 Sep 2004 12:29:28 GMT
* Richard Lewis:

> How can  I get a transforming  XSLT stylesheet to complete  the URI of
> the image from the name given in the <image> element so that it points
> to the image correctly?

The best way to deal with resources path is to pass a parameter to the
transformation in the sitemap, and get that parameter in the stylesheet.

sitemap:

<map:transform src='my.xsl'>
  <map:parameter name='resource.path' value='/resources/images'/>
</map:transform>

xsl:

<xsl:param name='resource.path'/>

<img src='{$resource.path}/ok.png'/>

HTH,
-- 
Jean-Baptiste Quenot
Anyware Technologies
http://www.anyware-tech.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message