cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <ba...@webslingerZ.com>
Subject playing with cocoon2
Date Sat, 24 Jun 2000 19:32:56 GMT
i been playing with cocoon2 somewhat - partly been trying to make a nice
web slideshow for a friend of mine and partly been trying to see what it's
like to use the sitemap for real world stuff. I'm a little stuck as to how
to link to the images cleanly. currently the images live in:

$TOMCAT_HOME/webapps/cocoon/photomontage

and i've got this snippet in my sitemap:

      <process uri="photomontage/" source="photomontage/">
        <generator name="image-directory"/>
        <filter name="xslt">
         <parameter name="stylesheet" value="photomontage/render.xsl"/>
        </filter>
        <serializer name="html">
         <parameter name="contentType" value="text/html"/>
        </serializer>
      </process>

(image-directory is variant on DirectoryGenerator i just checked in that
sets width and height attributes for GIF and JPEG images). Unfortunately,
in my stylesheet, I can't simply link to the images like so:

<img src="{@name}" width="{@width}" height="{@height}"/>

since that would resolve to the URI /cocoon/photomontage/filename.jpg,
which cocoon doesn't know how to handle. Do y'all reckon it's cleaner to -

1. 'mount' photomontage outside of the cocoon URIspace and link there -
e.g. <img src="/photomontage/@name"/>

2. add some sort of directive to the sitemap that says read the resource
and spew the bytes out -

<process uri="photomontage/*.jpg" src="photomontage/*.jpg">
 <pass-through type="binary"/>
</process>

3. 'mount' photomontage outside of the cocoon URIspace and have cocoon
issue redirects for those resources

or is there a more obvious solution that i'm missing?

- donald


Mime
View raw message