Hi Ron,
since you want to keep it as simple as possible, you could also take a
look at the RequestGenerator [1]. You can then use your XSL to process
the multiple results.
In that case the only thing you need to do in your sitemap is change
your generate part to an aggregate and you will probably have to change
your xslt a bit and that would be it.
Just as a side note: I always discourage use-request-parameters, since
it can give you problems when using caching pipelines.
Kind regards,
Jeroen Reijn
[1]
http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/generation/RequestGenerator.html
Ron Van den Branden wrote:
Hi,
In my application, I have some HTML forms containing lists of checkbox
inputs and multiple select boxes. This results in request URIs featuring
duplicate parameter names:
e.g.:
http://localhost:8888/myapp/processform.htm?par1=val1&par1=val2&par1=val3
If I pass these to my XSLT transformation using <map:parameter
name="use-request-parameters" value="true"/>, only the first value (viz.
"val1") ends up in my XSLT. This is a short sitemap.xmap snippet:
<map:match pattern="processform.htm">
<map:generate src="xml/{1}.xml"/>
<map:transform src="stylesheets/xml2htm/{1}.xsl">
<map:parameter name="use-request-parameters" value="true"/>
</map:transform>
<map:serialize type="xhtml"/>
</map:match>
So far, I worked around this with client-side Javascript that would
aggregate those values for the duplicate parameters into one string, so
that only 1 "par1" parameter is passed through:
e.g.: http://localhost:8888/myapp/processform.htm?par1=val1%20val2%20val3
In revising my app (and bringing it closer to unobtrusive JS practice),
however, I would like to free that vital part of its fuctionality (form
submission) from this client-side Javascript dependency.
My question is: is there a way of aggregating duplicate parameters into
one parameter at sitemap level? The scarce posts I came across on this
list suggest that it *can* be done (e.g.
http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=113474098814411&w=2),
but not exactly how... At least, I can't see a solution with my current
cocoon knowledge (not much beyond simple pipeline concepts, ie. no
flowscript, actions, XSP...).
I recognize this is not strictly a Cocoon problem (and apologize for
off-topicality), but hope there may be a Cocoon solution?
Thanks for any reaction!
Ron Van den Branden
---------------------------------------------------------------------
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]