cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Hertz <>
Subject Re: use-request-parameters with checkboxes
Date Tue, 03 Oct 2006 16:41:59 GMT
Hi Peter,

You can actually parse checkbox values using xslt2/xpath2 (I've only got 
it to work with get, not post):

Based on:

1. Add parameter to sitemap:
<map:parameter name="requestQueryString" value="{request:queryString}"/>

2. Add a global parameter as child of <xsl:stylesheet>
<!-- global parameter to hold queryString passed from sitemap -->
<xsl:param name="requestQueryString"/>

2: In your template, add
<!-- tokenize each checkbox choice -->
  <xsl:variable name="queryParams" select="tokenize($requestQueryString, 
  <xsl:variable name="checkboxValues" select="for $p in 
$queryParams[starts-with(., 'stuff=')] return substring-after($p, 

Each value can be selected using <xsl:for-each select="$checkboxValues">

(Thanks to Michael Kay for helping me with this)




If I change the action attribute of the form element to point to my
Cocoon (using a URI defined in my sitemap.xmap with 
use-request-parameters), it appears that Cocoon silently munges these 
into the format

This makes the data unusable, as the XSLT receives only one value for 
the parameter stuff (the first) and drops the othes on the floor.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message