cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Combinational Logic" <combinational.lo...@soc-ip.com>
Subject RE: Return xml from an Action to the pipeline?
Date Sun, 16 Oct 2005 22:27:16 GMT
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 requires?

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":
otherDom } );

The JXTemplate could be as simple as the following:

<to-merge>
	<report>
	  #{reportDom/*}
	</report>
	<other>
  	  #{otherDom/*}
	</other>
</to-merge>

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 pipeline?
> 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 instead?


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message