cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <>
Subject Re: generator and request attribute
Date Tue, 09 Mar 2004 02:03:29 GMT
On 11.02.2004 11:39, Roman Hrivik wrote:

> Hi
> I have custom generator where I set to request.attribute any value
> via
> ObjectModelHelper.getRequest(objectModel).getAttribute(RESULT_KEY)
> next in the sitemap I want there request attribute selector
> to decide what transformer to use
> this attribute is setted before any sax events generated.
> but it seems from my logs that selector is executed before I set attribute
> to request in generator.

Indeed. The pipeline must be built before any of the SAX processing 
starts. This means actions and selectors are executed before generators, 
transformers and serializers. This is also logical because the first SAX 
event goes immediately from the generator to the transformer. It is 
*not* waited until the generator finishs and sets some parameter, 
afterwards it goes on with the transformer.

> Do you have any hints how to solve this problem?
> My generator generate 2 diffrent XML depends of some logic behind.
> Is it possible to do it some way?
> Or should I better write transformer behind generator.

If you want to change the processing you have to move the deciding logic 
into an action.


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

View raw message