----- Original Message ----- From: "Carsten Ziegeler" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, October 15, 2003 9:49 PM Subject: RE: Redirect following a transformer does not execute the transformer
> 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. I think I'll have to read this a couple of times before I really understand all the implications of this. At first sight this seems to be a serious limitation.... but again... I migth not grasp it (yet). > 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 So I get: - Generator - Action - Redirect And the action will get executed even though there is no serializer? I think I'm getting confused.... And "I can call a pipeline from within an action.", but this means that I'm kind of obfuscating the way a URL is processed. The sitemap.xmap will no longer be the only place to find out how something is processed, I'll have to look at the source of the action as well. > > Carsten > Litrik De Roy www.litrik.com
