Re: RegexpRequestParameterSelector unable to get working.
2008/5/6 Gordore [EMAIL PROTECTED]: 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 I see you have map:parameter name=parameter-name value={group} / The -name suggests this map:parameter should be the name of the request parameter to check rather than its value, which is what you're supplying. Try using just value=group instead of {group}. Otherwise, those requests are telling it to do the regexp tests against the admin and user request parameters, which don't exist... And since the selector looks up the specified request parameter itself, that map:act type=request is unnecessary too, unless you need it for some other sitemap component. Andy -- http://pseudoq.sourceforge.net/ Open source java Sudoku generator - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RegexpRequestParameterSelector unable to get working.
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=groupsadmin|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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]