cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nick Entin" <en...@togethersoft.com>
Subject RE: Redirect after Generation/Transformation
Date Fri, 30 Nov 2001 11:19:58 GMT
Hi Nico,

You might be surprised to know that your generator and transformers are
not executed either!

I had your problem sometime ago and finished investigations on
sitemap_xmap.xsl (transformer of sitemap.xmap to java) - you might find
there that pipeline.execute is invoking only when serializer is
presented. From other side serializer is the last action in pipeline, so
you could not redirect after serialization.

The solution I found is 

>      <map:match pattern="**">
>           <map:generate src="statistics.xml"/>
            <map:transform type="statistics2html">
			<map:parameter name="redirecturi"
value="barrier/{1}" />
		</map:transformer>
		...
		<map:serialize type="html" />
>      </map:match>

And statistics2html is a little bit modified "statistics":
...
<xsl:param name="redirecturi" />
...
<html>
...
<meta http-equiv="refresh" content="1; url={$redirecturi}"/>
</html>

So when the pipeline is executed, the results will be shown for 1 sec
and then redirected to the desired uri...

Best wishes,
Nick

> -----Original Message-----
> From: ndirks@s-und-n.de [mailto:ndirks@s-und-n.de] 
> Sent: Thursday, November 29, 2001 6:02 PM
> To: cocoon-users@xml.apache.org
> Subject: Redirect after Generation/Transformation
> 
> 
> Hello,
> 
> I look for a possibility to redirect the processing of a 
> resource in C2 after a generator- and a transformer-call to 
> another resource, the obvious solutions would be 
> <map:redirect-to> or <map:read> at the end of the resource. I 
> think of something like this:
> 
>      <map:match pattern="**">
>           <map:generate src="statistics.xml"/>
>           <map:transform type="statistics"/>
>           <map:redirect-to uri="barrier/{1}"/>
>      </map:match>
> 
> But both alternatives do not work after generator- and 
> transformer-calls. Do I oversee something ? Or do I have to 
> implement an action...
> 
> Ciao
>   Nico Dirks
> 
> s&n AG
> netBank solutions
> Klingenderstr. 5
> D-33100 Paderborn
> Tel:      +49 (0)5251 / 1581 - 42
> Fax:      +49 (0)5251 / 1581 - 71
> <mailto:NDirks@sundn.de>
> Internet  http://www.sundn.de
> 
> 
> 
> ---------------------------------------------------------------------
> Please check that your question has not already been answered 
> in the FAQ before posting. 
<http://xml.apache.org/cocoon/faqs.html>

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



---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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


Mime
View raw message