cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gordore <mibe...@yahoo.co.uk>
Subject RegexpRequestParameterSelector unable to get working.
Date Tue, 06 May 2008 09:39:46 GMT

Hi,

I want to use the 'RegexpRequestParameterSelector' as I need to apply a
regular expression to a request parameter to dictate how the pipeline
operates.

Unfortunately when I apply a pattern or use the given examples it seems to
ignore the pattern and goes to the otherwise.

  <map:selectors default="paramter">
     <map:selector name="request-param-regexp"
src="org.apache.cocoon.selection.RegexpRequestParameterSelector">
       <pattern name="empty">^$</pattern>
       <pattern name="number">^[0-9]+$</pattern>
       <pattern name="string">^.+$</pattern>
       <pattern name="groups">admin|manager</pattern>
     </map:selector>
  </map:selectors>
 </map:components>


<map:match pattern=”test”>
	<map:generate src=”content/group.xml” />
	<map:act type=”request”>
            	<map:parameter name=”parameters” value=”true” />
		<map:select type=” request-param-regexp”>
			<map:parameter name=”parameter-name” value=”{group}” />
			<map:when test=”groups”>
	<map:transform type=”xslt” src=”xslt/text.xslt”>
		<map:parameter name=”arg” value=”true” />
	</map:transform>
</map:when>
<map:otherwise>
  	<map:transform type=”xslt” src=”xslt/text.xslt”>
		<map:parameter name=”arg” value=”false” />
	</map:transform>
</map:otherwise>
		</map:select>
            </map:act>
<map:serialize type=”html” />
</map:match>

http://server/cocoon/test?group=admin
	arg = false

http://server/cocoon/test?group=user
            arg = false

Could anyone help?

Matt. Beaumont

-- 
View this message in context: http://www.nabble.com/RegexpRequestParameterSelector-unable-to-get-working.-tp17079274p17079274.html
Sent from the Cocoon - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message