cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Portier <>
Subject Re: order of execution in the pipeline
Date Thu, 03 May 2007 08:20:38 GMT

Stefan Shoeman wrote:
> Hello *,
> I'm confused about the order in my pipeline:
> I write a HTML-table, which gets transformed (with a custom action) in
> a PDF.
> The strange about it: Cocoon calls first the execution of my action and
> then
> writes the HTML-file.
> -----------------8<--------------------------------------------------------------------------
> <map:transform type="write-source">
>       <map:parameter name="serializer" value="html"/>
> </map:transform>
> <map:act type="MyCustomAction"/>
> <map:serialize type="html"/>
> ------------------------------------------------------>8--------------------------------------
> Any idea, how I can write first the HTML an then call my action?

You can't.

sitemap 101:

Matchers and actions and the like are 'interpreted/executed' first to
actually decide on the fixed, definitive and configured chain of
generator, transformers, serializer (called the pipeline) that should
handle this http-request.

Then that configured pipeline is 'executed', meaning the generator
starts producing sax-events that should flow through the (then
unchangeable) set of transformers (some of those events might get
blocked or translated by those) to eventually be translated into the
http-response byte-stream by the serializer

- none pipeline components in the sitemap
  - work on the request
  - select, configure and assemble the pipeline components (GT*S) to use
- those pipeline components then
  - work to produce the response
  - based on sax-events flowing through

Back to your case now: what do you really want to do?

Why don't you just transform the html to xsl-fo and then serialize that
to pdf?

Have you checked the hello-world samples? They show how to do the above.


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

View raw message