Thanks to all for your help!
It's working now, with two different methods:

1°) Using a RequestParamAction:
<map:act type="request">

<map:parameter name="parameters" value="true"/>

<map:generate src="documents/participants.xml"/>

<map:transform src="stylesheets/participants{langue}.xsl">

<map:parameter name="use-request-parameters" value="true"/>

<map:parameter name="tri" value="{critere}"/>

</map:transform>

</map:act>

and by editing a default participants.xslt file, as described by Joerg.

2°) Using a RequestSelector:

<map:generate src="documents/participants.xml"/>

<map:select type="request">

<map:parameter name="parameter-name" value="langue"/>

<map:when test="francais">

<map:transform type="xslt-with-parameters"

src="stylesheets/participantsFR.xsl">

</map:transform>

</map:when>

<map:when test="anglais">

<map:transform type="xslt-with-parameters"

src="stylesheets/participantsEN.xsl"/>

<map:parameter name="use-request-parameters" value="true"/>

</map:when>

<map:otherwise>

<map:transform type="xslt-with-parameters"

src="stylesheets/participantsFR.xsl"/>

</map:otherwise>

</map:select>

<map:serialize type="html"/>



with transformer component 'xslt-with-parameters' defined as below:

<map:transformer name="xslt-with-parameters"
src="org.apache.cocoon.transformation.TraxTransformer">

<use-request-parameters>true</use-request-parameters>

</map:transformer>



Now, I will try to do something with i18nTransformer, so that I shouldn't
need no more two stylesheets.

If you know some accessible documentation about it, I would be very
intersted in...

Any way , Again Many Thanks, for your Help,

Best,

Cyril.

----- Original Message -----
From: "Joerg Heinicke" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, January 25, 2003 4:42 PM
Subject: Re: simple question about RequestSelector


> Hello Cyril,
>
> the participants.xsl can be really simple:
>
> <xsl:stylesheet version="1.0" xmlns:xsl="..">
>
> <xsl:include href="participantsYOURDEFAULTLANGUAGE.xsl"/>
>
> </xsl:stylesheet>
>
> Replacing YOURDEFAULTLANGUAGE with EN or FR you can choose the default
> language of the application. And the above stylesheet is really not
> difficult to maintain.
>
> But maybe there is such a fallback operation in the input modules too?
>
> Regards,
>
> Joerg
>
> Cyril Vidal wrote:
> > Hi Christian,
> >
> > Thanks again very much for your help.
> > I've tested what you suggested me (a good idea...) and it works fine:
> >
> > But, as I read in Cocoon center's lesson about request parameter:
> > Some advantages of RequestSelector over a RequestParamAction are that
> >
> >          you can use a default stylesheet when the parameter is not
present,
> >
> >
> > and in my example, when I point the browser for the first time to
> > http://localhost:8080/cocoon/hellococoon
> >
> > of course, because I not have participants.xsl among my stylesheets but
> > juste participantsFR.xsl and particpantsEN.xsl,  Cocoon generates an
> > error...(In fact, I've added another particpants.xsl styleshhet to fix
the
> > problem, but it also requires to build another stylesheet...). Or is
there
> > another simplest solution?
> >
> >
> >>Regarding the original question, I believe the "use-request-parameters"
> >>configuration needs to go into the configuration section and not into
> >>the pipeline.
> >
> >
> > IN the same lesson, it's said apparently that we can:
> >
http://www.cocooncenter.de/cc/documents/resources/request-params/transformer
> > .html
> > I've tested it in another example and it seemed to work.
> >
> >  In addition, you would not neet the next
> >
> >>  <map:parameter name="tri" value="{critere}"/>
> >>becasue *all* parameters are available. Besides, "{critere}" is
> >>undefined at this place since the selector does not set any sitemap
> >>variables. For this you would need either the input module syntax above
> >>or an action that sets a variable.
> >>
> >
> >
> > ...I'm sorry, but I'm afraid not to understand very well what you're
trying
> > to explain to me...
> > How can I mix an action and a select?
> >
> > Thanks for your help,
> > Best,
> > Cyril.
>
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
>


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to