cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <cziege...@s-und-n.de>
Subject RE: choose a random image
Date Tue, 14 Oct 2003 11:55:37 GMT
Bertrand Delacretaz wrote:
>
> Le Mardi, 14 oct 2003, à 13:34 Europe/Zurich, Jon Evans a écrit :
>
> > ...I can use a directory generator to give me a list of images, but I
> > don't know how to transform that list in order to select one of them
> > at random.
>
> The easiest thing that comes to mind is an XSLT transform, using java
> extensions to call java.util.Random to generate a random selection
> index.
>
If you want to make a redirect, you can't use the a pipeline for it
because a redirect is not allowed after the pipeline (generator)
has started.

Another possibility is to write a simple action (3 lines) that
uses java.util.Random, generates a random in a given range and
provides this value to the sitemap.

Carsten


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


Mime
View raw message