cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <cziege...@s-und-n.de>
Subject RE: Redirect following a transformer does not execute the transformer
Date Wed, 15 Oct 2003 19:49:39 GMT
Tony Collen wrote:
> 
> Litrik De Roy wrote:
> > Imagine the following pipeline:
> > 
> >   <map:match pattern="delete">
> >     <map:generate src="delete.xml"/>
> >     <map:transform type="write-source"/>
> >     <map:redirect-to uri="list"/>
> >   </map:match>
> > 
> > I have noticed that the Source Writing transformer does not get 
> executed ?
> > It looks like the sitemap is "optimizing" the pipeline and 
> assuming "hey,
> > I'll need to redirect, why bother doing the generate and transform".
> > 
> > Does this work as designed, or am I missing something?
> 
> Hmm, I'm not 100% on the inner functionality of Cocoon's 
> pipelines, but it could be the way they are 
> assembled before any data is sent through.
> 
A cocoon pipeline is execute after the serializer is set, so
as long as you dont have a serializer, the pipeline does simply
nothing.
A redirect is executed immediately and then the processing stops.
So, in your case a pipeline with a generator and a transformer
is setup, but not executed; the redirect is reached and
executed.
So, using an action seems a better way. You can e.g. call
a pipeline from within the action and then making
your redirect

Carsten

Mime
View raw message