If you are willing to make a detour through FlowScript, you can access the separate values there,
join them into one string, reset the request param to the joined value and pass that to (the pipe
using) the stylesheet.
But on the other hand, a bit of JavaScript can do this client-side as well.. ;-)
Cheers,
Geert
Stefan Pietschmann wrote:
I think this is due to the HttpServletRequest.getParameter() method, which
seems to be used:
"getParameter
Returns the value of a request parameter as a String, or null if the
parameter does not exist...
You should only use this method when you are sure the parameter has only ONE
value. If the parameter might have MORE than one value, use
getParameterValues(String).
If you use this method with a multivalued parameter, the value returned is
equal to the FIRST value in the array returned by getParameterValues."
So you can only use {request-param:...} if there's only one parameter.
If this page (http://wiki.apache.org/cocoon/InputModules) is still right,
the following should work for you:
"If you have multiple parameters with the same name, and want to get one of
them, say the 2nd one, you'll have to use the RequestModule, that has JXPath
features, like in this sample:
<map:parameter name='my-parameter'
value='{request:getParameterValues(.,"myParameter")[2]}'/>"
Stefan
| -----Ursprüngliche Nachricht-----
| Von: Daniel Hertz [mailto:[EMAIL PROTECTED]
| Gesendet: Donnerstag, 15. Dezember 2005 18:27
| An: Cocoon-Users List
| Betreff: Confused about sitemap query parameters
|
| Given a query string:
|
| approved=1&approved=2&approved=4&foo=bar
|
| how do you access each 'approved' parameter value and pass it to XSLT?
|
| If I use:
|
| <map:transform type="xslt" src="somepage.xslt">
| <map:parameter name="approved" value="{request-param:approved}"/>
| </map:transform>
|
| I only get the first value (1).
|
| I'm wanting to take all the 'approved' parameter values and concatenate
| them to:
|
| (1,2,4)
|
| Thanks for any tips you may have!
|
| Daniel
|
| ---------------------------------------------------------------------
| To unsubscribe, e-mail: [EMAIL PROTECTED]
| For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Drs. G.P.H. Josten
Consultant
Daidalos BV
Source of Innovation
Hoekeindsehof 1-4
2665 JZ Bleiswijk
Tel: +31 (0) 10 850 1200
Fax: +31 (0) 10 850 1199
www.daidalos.nl
De informatie - verzonden in of met dit emailbericht - is afkomstig van Daidalos BV en is
uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen, verzoeken
wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]