cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giacomo Pati <Giacomo.P...@pwr.ch>
Subject Re: playing with cocoon2
Date Sat, 24 Jun 2000 21:07:02 GMT
On Sat, Jun 24, 2000 at 03:32:56PM -0400, Donald Ball wrote:
> 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"/>

This is the way to go for C2 in its current incarnation!

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

This is where the <read> tag proposed in the sipemap working draft comes
to play. Its something like a combination of a binary generator and 
a binary Serializer.

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

<match uri="photomontage/*">
  <read src="photomontage/*.jpg" mime-type="image/jpeg">
</match>

I've used the notion Stefano proposes not to show the technology 
used (here .jgp) in the URI space.

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

I think this is not achievable with todays C2 version.

Giacomo

-- 
PWR GmbH, Organisation & Entwicklung      Tel:   +41 (0)1 856 2202
Giacomo Pati, CTO/CEO                     Fax:   +41 (0)1 856 2201
Hintereichenstrasse 7                     Mailto:Giacomo.Pati@pwr.ch
CH-8166 Niederweningen                    Web:   http://www.pwr.ch


Mime
View raw message