In the docs and examples for the request-parameter selector,
the selection tests are done on the value of a particular request-
parameter
map:select type=request-parameter
map:parameter name=parameter-name value=command/
map:when test=list
/map:when
map:when test=create
...
Steven D. Majewski napisaĆ(a):
[...]
Is there any way to select in the sitemap based on the
presence of ANY request parameters ?
The current situation is little bit confusing and limited because null
values and empty strings usually are treated as equal in sitemap's
expressions/conditions.
In fact, this didn't work:
map:select type=request-parameter
map:parameter name=parameter-name value=external-entity-uri /
map:when test=
!-- normal document processing --
/map:when
map:otherwise
!-- process request parameter --
/map:otherwise
/map:select
It seems to always do the
From: Steven D. Majewski [EMAIL PROTECTED]
Date: Sat, 3 Mar 2007 10:59:51 -0500
In fact, this didn't work:
map:select type=request-parameter
map:parameter name=parameter-name value=external-entity-uri /
map:when test=
!-- normal document processing --
/map:when
map:otherwise
!-- process
Thanks to both Grzegorz Kossakowski and Andrew Stevens
who both pointed me to RequestParameterExistsAction.
This does exactly what I want:
map:match pattern=*/*.*
map:act type=req-params
map:parameter name=parameters value=unparsed-entity-uri /
map:redirect-to