----- Original Message ----- From: "Tony Collen" <[EMAIL PROTECTED]>
> 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. Neither do I know the internals of the pipeline. And I can't seem to find the source of the code doing the sitemap stuff. I can locate and understand the source of a simple generator, but the sitemap itself... > > > PS: The use case for the above pipeline is displaying a list where the user > > can delete some entry. This calls the "delete" url (typically with some > > parameters) but I want to prevent that the browser shows the delete url in > > the address bar. So I redirect to the list URL which refreshes the list and > > displays a very nice URL (but unfortunately no longer executes the > > transform). > > > If you're trying to delete a file, perhaps an action would be more appropriate? > Well I'm doing a lot of different things: aggregate some data, send it through a custom transformer, do some extra xsl, send it through the session transformer to update some xml stored in my session context, next send it through the source writing transformer to update a snippet of xml on disk. The pipeline works beautifully without the redirect. But to get rid of the ugly URL in the browser I was hoping to use a redirect. > Regards, Thanks for your feedback. > > Tony > Litrik De Roy www.litrik.com
