Re: Redirect after Generation/Transformation
On 29.Nov.2001 -- 06:02 PM, [EMAIL PROTECTED] wrote: 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... Beware: resource != resource resource = any URI = map:redirect-to uri=/ = not possible after generate resource = map:resource/ = map:redirect-to resource=/ = possible everywhere in pipeline Chris. -- C h r i s t i a n H a u l [EMAIL PROTECTED] fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08 - 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Redirect after Generation/Transformation
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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 29, 2001 6:02 PM To: [EMAIL PROTECTED] 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 sn AG netBank solutions Klingenderstr. 5 D-33100 Paderborn Tel: +49 (0)5251 / 1581 - 42 Fax: +49 (0)5251 / 1581 - 71 mailto:[EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Redirect after Generation/Transformation
On Thursday 29 November 2001 12:02 pm, you wrote: 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... I would recommend implementing an action and calling the action before the generator. Once you start the SAX stream, you may no longer be able to redirect, depending on whether or not the client has started to receive content yet. -pete -- peter royal - [EMAIL PROTECTED] - 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]