cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Beat De Martin <beat.demar...@gmx.ch>
Subject Re: SourceWritingTransformer and redirect
Date Sun, 02 Feb 2003 22:31:25 GMT
I guess a serializer is mandatory in a pipeline.
What I did now, I used a aggregation. One map:part just writes the files and
the other one prepares the html which I want to send to the client.

<map:match pattern="bestellung">
 <map:generate type="serverpages" src="xml/bestellung.xml"/>
  <map:serialize type="xml"/>
</map:match>
<map:match pattern="bestellungmail">
  <map:generate type="serverpages" src="xml/bestellung_pdf.xml"/>
  <map:transform src="xsl/bestellung_fo.xsl"/>
  <map:transform type="filewriter">
   <map:parameter name="serializer" value="fo2pdf"/>
  </map:transform>
<map:serialize type="xml"/>
</map:match>

<map:match pattern="bestellunguebermittlung.html">
 <map:act type="controller">
  <map:aggregate element="page">
   <map:part src="cocoon:/bestellung" strip-root="true"/>
   <map:part src="cocoon:/bestellungmail" strip-root="true"/>
 </map:aggregate>
<map:transform src="xsl/bestellunguebermittlung.xsl"/>
<map:serialize type="html"/>
</map:act>
<map:redirect-to uri="logout.html"/>
</map:match>




> Hi folks
> Is it possible to use SourceWritingTransformer and then a redirect. Like
> this:
> ...
> <map:transformer name="filewriter"
> src="org.apache.cocoon.transformation.SourceWritingTransformer"/>
> ...
> <map:match pattern="bestellunguebermittlung.html">
> <map:act type="controller">
>   <map:generate type="serverpages" src="xml/bestellung_pdf.xml"/>
>   <map:transform src="xsl/bestellung_fo.xsl"/>
>   <map:transform type="filewriter">
>    <map:parameter name="serializer" value="fo2pdf"/>
>   </map:transform>
>   <map:transform src="xsl/lieferadresse.xsl"/>
>   <map:serialize type="xml"/>
>   <!-- this works but SourceWritingTransformer does NOT write the file -->
>   <!-- map:redirect-to uri="realbestellunguebermittlung.html"/-->
> </map:act>
> <map:redirect-to uri="logout.html"/>
> </map:match>
> 
> 
> With <map:serialize type="xml"/> it works, but when I use redirect, the
> file
> is not written. The redirect itself works.
> Any suggestions ?
> 
> Cheers
> Beat De Martin
> 
> -- 
> +++ GMX - Mail, Messaging & more  http://www.gmx.net +++
> NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen!
> 
> 
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
> 
> To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>
> 

-- 
+++ GMX - Mail, Messaging & more  http://www.gmx.net +++
NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen!


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.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