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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to