cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrzej Jan Taramina" <andr...@chaeron.com>
Subject SOLVED: Executing multiple pipelines for a request?
Date Fri, 19 Sep 2003 18:32:00 GMT
I had asked:

> I have a situation where I need to transform a single input XML document into
> multiple (3 or 4 actually) output documents (which will be stored in a
> database).  It's code generation functiohnality (using Cocoon to generate
> Cocoon code itself) which is where the need for the multiple files arises.
> 
> I haven't come up with a good way to accomplish this in a single request.  

Now that I know that <map:call> (thanks Tom) in 2.1.1 will return (it's a 
gosub now, not a goto), that solves the problem very nicely.  

All I need to do is to create a resource for each branch that I want to 
execute and then do as many <map:call>s in a row as I need.

The sub pipes (resources) can also be set up to return status information on 
whether they succeeded or not, so that can be used to control whether to stop 
the main pipeline in the even of an error.  

It would also be possible to make each sub pipe acts as an identity 
transform, then it becomes easy to create a pipeline that takes a single 
input document and creates 4 different outputs from it (each output would be 
stored into a database in my case).  Though I'm not sure that it wouldn't be 
easier for the subpipe to just use it's own generator to get the original 
starting document.

Awesome!

Thanks for all the help from everyone....



Andrzej Jan Taramina
Chaeron Corporation: Enterprise System Solutions
http://www.chaeron.com


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


Mime
View raw message