hi cyril,
the problem is the '{critere}'. you have no sitemap component creating this
sitemap variable. but in this case you don't need that anyway since you are
instructing the XSLT-/TraxTransformer to 'use-request-parameters', i.e. make
all request parameters available to the stylesheet as stylesheet params. to
be able to access 'critere' within the stylesheet then, declare it at the
head of your stylesheet (<xsl:param name="critere"/>). should you need the
parameter to be named 'tri', the simple solution would be a <xsl:param
name="tri" select="$critere"/>.
HTH
-----Urspr�ngliche Nachricht-----
Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]Im
Auftrag von Cyril Vidal
Gesendet: Samstag, 25. Januar 2003 13:52
An: [EMAIL PROTECTED]
Betreff: simple question about RequestSelector
Dear all,
I would like to process an URI of the following type:
http://localhost:8080/cocoon/hellococoon?langue=anglais&critere=organisme
The first parameter's role is to select a specified stylesheet:
langue=anglais -> select participantsEN.xslt
langue=francais -> select participantsFR.xslt
while parameter 'critere' is used to pass a parameter to the selectionned
stylesheet.
If I only take care about the parameter 'langue', the following code's
snippet using RequestSelector works fine:
<map:match pattern="">
<map:generate src="documents/participants.xml"/>
<map:select type="request">
<map:parameter name="parameter-name" value="langue"/>
<map:when test="francais">
<map:transform src="stylesheets/participantsFR.xsl">
</map:transform>
</map:when>
<map:when test="anglais">
<map:transform src="stylesheets/participantsEN.xsl"/>
</map:when>
<map:otherwise>
<map:transform src="stylesheets/participantsFR.xsl"/>
</map:otherwise>
</map:select>
<map:serialize type="html"/>
</map:match>
But When I want to deal with the second parameter too, (by adding the
following instructions):
<map:parameter name="use-request-parameters" value="true"/>
<map:parameter name="tri" value="{critere}"/>
I have some problems, indeed I receive no error messag but nothing is
happening.
I use the the following code:
<map:match pattern="">
<map:generate src="documents/participants.xml"/>
<map:select type="request">
<map:parameter name="parameter-name" value="langue"/>
<map:when test="francais">
<map:transform src="stylesheets/participantsFR.xsl">
<map:parameter name="use-request-parameters" value="true"/>
<map:parameter name="tri" value="{critere}"/>
</map:transform>
</map:when>
...
</map:match>
</map:when>
I'm sure the XSLT works well , so I guess the sitemap' syntax ins't good.
Can someone help me, please?
Thannks in advance,
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]>