cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Marasti-Georg" <>
Subject RE: Return xml from an Action to the pipeline?
Date Mon, 17 Oct 2005 12:24:18 GMT
Or easier still, have a pipeline for each source that simply does a
generate and serialize as xml, and use an aggregation:
<map:match pattern="request">
    <map:aggregate element="merged">
        <map:part src="cocoon://report"/>
        <map:part src="cocoon://other"/>
    <map:transform src="transform.xsl"/>
    <map:serialize type="xhtml"/>
<map:match pattern="report">
    <map:generate type="report-generator"/>
    <map:serialize type="xml"/>
<map:match pattern="other">
    <map:generate src="context://my/other/file.xml"/>
    <map:serialize type="xml"/>
The xml that gets to the transformer would look like:
where report-document and other-document are the document elements of
those individual xml files.
Chris Marasti-Georg


	From: Combinational Logic
	Sent: Sunday, October 16, 2005 6:45 PM
	Subject: RE: Return xml from an Action to the pipeline?

	I think this would be possible with cinclude.  Each generator
would have its own pipeline.  One of your generators would generate
cinclude tags that pull in XML from the other generator/pipeline.



	From: Lachlan Paterson [] 
	Sent: Sunday, October 16, 2005 3:39 PM
	Subject: Re: Return xml from an Action to the pipeline?


	Is it possible to have two generators and then merge the

	On 10/16/05, Combinational Logic <
> wrote:

	Having never created a generator, I can't comment on that, but
it sounds 
	like a good idea.  Can anyone estimate how much effort this
	Another way might be call the java lib from flowscript, creating
a DOM.
	Then pass the DOM to a JXTemplate (along with any other DOMs you
want to 
	'merge' with).  The flowscript would look as follows:
	var reportDom = Way.To.Create.Dom.From.Some.Java.Lib();
	var otherDom = Way.To.Load.Your.Other.Dom();
	cocoon.sendPage("merge-jxpipe", {"reportDom" : reportDom,
	otherDom } );
	The JXTemplate could be as simple as the following:
	Then you could use XSLT to do the merge.
	Lachlan Paterson wrote: ...
	> So, Jasper Reports aside, my question (assuming the above
method is
	> sound) is a more general 2 part question: 
	> 1) How do I return xml from an Action and access it in the
	> 2) How to I merge that xml document into the one that the
pipeline is
	> processing?
	Actions should not return XML. Why not write a generator
	To unsubscribe, e-mail:
	For additional commands, e-mail:
	To unsubscribe, e-mail:
	For additional commands, e-mail:


View raw message