cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Hoskens>
Subject Re: Chaining
Date Thu, 06 Jan 2005 13:13:27 GMT
Mark Donnelly wrote:
> Sorry but my question was incorrectly stated.
> A standard pipeline with a transform and a serialise will take care of the
> problem I originally posted.
> What Im wondering is if I need to do multiple transformations, ie transform
> an XML doc using two or more different XSLT docs. and then
> feed the results into various serialisers, how this is done?

What do you mean various serializers? You cannot send multiple responses 
back to a client. But if you want to be able to get the same page in 
different formats, you may want to use views (if I remember correctly):

<map:view from-label="pdf" name="pdf">
	<map:transform src="stylesheets/page2pdf.xsl"/>
	<map:serialize type="fo2pdf"/>

then in your pipe:


	<map:sometransformer label="pdf"/> <!-- this label says, you can have 
another view behind me using the from-label -->
	<map:serialize type="html"/>

and call this with "myURL?cocoon-view=pdf" to get the pdf version. (look 
at for more info)

If you want to have some other pipeline executed eg: write some document 
to disk and send a reply with another pipe, you can use the following in 
your flow:

var pipelineUtil = 
var document = pipelineUtil.processToDOM("mypipe", null);
(or processToSAX/processToStream)

Is this what you're referring to? Or can you give a concrete example of 
what you're trying to do?

Kind Regards,

> Mark
> -----Original Message-----
> From: Mark Donnelly []
> Sent: 06 January 2005 12:54
> To: ''
> Subject: Chaining
> Hello,
> Im looking to chain a number of 'actions' together:
> 1. Transform an XML document using XSLT to get XSL:FO
> 2. Put this XSL:FO into FOP to get pdf.
> Im new to Cocoon and whilst Ive read a fair bit of the documentation, I
> havent been able to fathom what a pipeline for this would look like. 
> Ive got an idea of how to create each one independantly but not sure how to
> take the output of 1. and feed it into 2. on the fly.
> Any pointers would be appreciated.
> Mark
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

View raw message