cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeroen Reijn <j.re...@hippo.nl>
Subject Re: How Acceding request attribute in sitemap
Date Wed, 06 Dec 2006 17:14:29 GMT
Ah it seems I did not read the message correctly. I thought one thing 
happened after each other in the pipeline.

Habib, could you show use the pipeline structure of your request which 
contains the map:parameter name="test"?

Jeroen

Simone Gianni wrote:
> Hi Habib,
> 
> Habib Kaci wrote:
>> Hi,
>>
>>         I want set request attributes in xsp pages, and use them in
>> the sitemap.
>>
>>         I do that in xsp page : <xsp-request:attribute
>> name="toto">tata</xsp-request:attribute>
>>
>>         in the sitemap : <map:parameter name="test"
>> value="{request-attr:toto}"/>
>>
>>         But that doesn't work.  Any idea ?
>>
> This is a quite common misunderstanding. The pipeline processing is a
> two phase process. In the first phase the pipeline is composed, then the
> generator starts generating, transformers transforming and serializers
> serializing.
> 
> Cocoon streams sax events. That means that when you xsp page sends it's
> first element (say <html>), that element is sent to the first
> transformer, which eventually transform it to and then send it to the
> second transformer etc.. etc.. up to the serializer. The serializer
> sends it to the browser, and then the generator generates the second
> element (say <head>) and so on.
> 
> It's not made in single steps (generator generates all XML, transformer
> 1 transforms it, transformer 2 transforms it, serializer serializes it),
> but it a smooth flow of elements.
> 
> To realize this, the generator needs to be connected to the transformers
> and to the serializers *before* it actually begins to execute. So,
> <map:parameter name="test" value="{request-attr:toto}"/> is executed
> *before* <xsp-request:attribute name="toto">tata</xsp-request:attribute>.
> 
> So, using request attributes is not a solution to your problem.
> 
> Unfortunately I have no idea how the migration from 1.x to 2.0 was
> handled back in 2000/2001, have you tried searching mailing list
> archives for other people having your problem back in that period?
> 
> Simone
> 
> 
> ---------------------------------------------------------------------
> 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