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 request parameter -->
</map:otherwise>
</map:select>
It seems to always do the otherwise.
Is there another way to select on the presence
( rather than the value ) of a request param ?
How about
org.apache.cocoon.acting.RequestParameterExistsAction
?
" * This action simply checks to see if a given request parameter
* exists. It takes an arbitrary number of default parameters to check
* named 'parameter-name'. Non-default parameters need to be separated
* by spaces and passed as value of a sitemap parameter named
* 'parameters'. The action returns a map with all parameters if all
* of them exist and null otherwise."
Andrew.
--
http://pseudoq.sourceforge.net/ Open source java Sudoku application
-- Steve Majewski
On Mar 3, 2007, at 10:37 AM, Steven D. Majewski wrote:
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">
...
</map:when>
...
<map:otherwise>
...
</map:otherwise>
</map:select>
But what I want to do is select different processing
depending on the presence of a request parameter:
if no parameter exists, then process document normally;
if parameter exists, do something with that parameter.
What is the best way to do that?
Will <map:when test=""> work when there's no parameter
as well as a null parameter ?
( Then I could have normal document processing under
that test and parameter processing under <map:otherwise>
Is there any way to select in the sitemap based on the
presence of ANY request parameters ?
I tried adding "*.*?**" as a pattern before my "*.*" pattern
but this didn't seem to work.
-- Steve Majewski
_________________________________________________________________
Get Messenger FREE on your Mobile https://livemessenger.mobile.uk.msn.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]