Maybe this code can help you!
Here "Count" is an action Parameter ...

    <map:match pattern="process-unveil">
        <map:act type="unveil-it">
                <map:parameter name="UnveilServer" value="kioto"/>
                        <map:select type="parameter">
                                <map:parameter name="parameter-selector-test" 
value="{Count}"/>
                                <map:when test="0">
                                <map:generate type="serverpages" src="count0.xsp">
                                        <map:parameter name="use-request-parameters" 
value="true"/>
                                </map:generate>
                                </map:when>
                                ....
                        </map:select>

Eduardo.
-----Original Message-----
From: Kenneth Petersen [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 30, 2001 9:04 AM
To: users
Subject: Cocoon2 : Selector using parameter from request.


I would like to use a parameter from the request to determine what xml-file
to view. Without being sure, I think that the "parameter"-selector
(org.apache.cocoon.selection.ParameterSelectorFactory) from the Cocoon
SiteMap can be used for this. As a test I have written the following
matcher:

   <map:match pattern="test/*">
        <map:select type="parameter">
                <map:parameter name="parameter-selector-test" value="XXXX"/>
                <map:when test="condition1">
                        <map:generate 
src="cocoon:/vo-form/nameForPerson/Jan/default/1"/>
                </map:when>
                <map:otherwise>
                        <map:generate src="cocoon:/vo-form/nameForPerson/Jan/part/1"/>
                </map:otherwise>
        </map:select>
        <map:serialize type="xml"/>
   </map:match>

What I would like is to be able to pass a parameter from the request instead
of value="XXXX". How do I accomplish this?


Best regards
KP

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.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/faqs.html>

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

Reply via email to