cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robby Pelssers <>
Subject RE: pipeline component
Date Thu, 08 Mar 2012 12:16:02 GMT
Hi Jos,

I know you're using C3.  But your requirements are not yet completely clear to me. 

So the user fills in some form and on submit some pipeline is invoked that generates some
report. Is that report XML, PDF, or plain XHTML?
And instead of sending that report to the browser you want it zipped?

I don't think you need any special component to do so. At least not in C2.2. Not sure if the
ZipSerializer is already available in C3 but let's assume it is.

You can use a combination of the zipserializer and the cinclude transformer to generate the
report and insert it as an entry.  I will explain using jxtemplate generator but I think you
can switch to using StringTemplate generator.

Suppose this file is report.jx
<?xml version="1.0" encoding="UTF-8"?>
  <zip:entry name="${customer}.xml">
    <!-- assume your report is some xml file -->
    <cinclude:include src="cocoon://report/${customer}.xml"/>

The sitemap could look like this:

 | {1}: customer-id
<map:match pattern="report2zip/*">
  <map:generate src="jx/report.jx" type="jx">
    <map:parameter name="customer" value="{1}"/>
  <map:transform type="cinclude"/>
  <map:serialize type="zip"/>

Hope this comes close to what you need.


-----Original Message-----
From: Jos Snellings [] 
Sent: Thursday, March 08, 2012 11:45 AM
Subject: pipeline component

Hi !

*  a web form controls the generation of a report
* the report comes as a .zip  download

What sitemap component should be created for this report generator?
(in fact it should be a single component, like map:read)
- set headers
- write zip output to response.getOutputStream


To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message