cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <joerg.heini...@gmx.de>
Subject Re: Modifying pipeline at request time?
Date Sun, 27 Jun 2004 12:37:50 GMT
On 27.06.2004 01:28, Ralph Goers wrote:
> I should think one could write an action that generates a sub-sitemap 
> and then cause that sub-sitemap to be invoked from the action using a 
> source resolver.

Ok, this *might* work, but it sounds hacky and will be a hell to 
maintain, won't it?

IMO having many different pipelines, one for each document type, and 
reusing the common parts via resources is much cleaner.

Joerg

> At 6/26/2004  08:17 AM, Joerg Heinicke wrote:
> 
>>> I would like to be able to dynamically generate and/or modify a 
>>> pipeline at
>>> request time, so that I can create an aggregated response using one 
>>> or more
>>> sub-documents, to be chosen based on the request. I'd also like to be 
>>> able to
>>> choose, at the same time, appropriate Transformers depending on the data
>>> requested, and probably choose a Serializer as well. In short, I'd 
>>> like to be
>>> able to build a pipeline from scratch at request time.
>>> I'd really rather not do this by performing if/else logic with a 
>>> Selector in the
>>> sitemap, because I don't want to have to edit it every time I create 
>>> a new type
>>> of sub-document.
>>> I'm open to writing an action, using Flowscript, or just about 
>>> anything else
>>> that will perform well. I looked at the API for pipeline-related 
>>> classes, but I
>>> didn't see an obvious place to start. I'm also happy to achieve the 
>>> same result
>>> some other way, as long as it lets me choose data sources, 
>>> transforms, and
>>> output format at request time. Can anyone suggest an approach I 
>>> should look at?
>>
>>
>> That's not possible, the pipeline setup is the first thing that is 
>> done. What you can do is to give the control over the pipeline 
>> selection (read: not setup) to the flow and select dependent on the 
>> document type the correct pipeline. When using resources you should 
>> reach a high level of reusability. The dynamic aggregation can be done 
>> using CInclude or XInclude.
>>
>> Joerg

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


Mime
View raw message