Hi Leszek
To do (and I did) something like the following (a I assume such a case
cannot be solved with an action):
<map:resource name="genXml">
<map:select type="regexpSelector">
<map:parameter name="parameter-name" value="mpid"/>
<map:when test="validMpid">
<map:aggregate element="data">
<map:part src="cocoon:/genXmlRequest?mpid={mpid}" />
<map:part src="util/xml/menu/{language}/menupos-{mpid}.xml"
/>
<map:part src="{srcUri}" />
</map:aggregate>
</map:when>
<map:otherwise>
<map:aggregate element="data">
<map:part src="cocoon:/genXmlRequest" />
<map:part src="{srcUri}" />
</map:aggregate>
</map:otherwise>
</map:select>
</map:resource>
The selector is defined as follows:
<map:selectors>
<map:selector name="regexpSelector"
src="org.apache.cocoon.selection.RegexpRequestParameterSelector">
<pattern name="empty">^$</pattern>
<pattern name="number">^[0-9]+$</pattern>
<pattern name="string">^.+$</pattern>
<pattern name="validMpid">^([1-9]\d*|[^/]+)$</pattern>
</map:selector>
</map:selectors>
Cheers Raffaele
> -----Ursprüngliche Nachricht-----
> Von: Leszek Gawron [mailto:[EMAIL PROTECTED]
> Gesendet: Donnerstag, 13. Oktober 2005 12:39
> An: [email protected]
> Betreff: Re: RequestParameterExistsSelector
>
> Merico Raffaele wrote:
> > Dear community
> >
> > Depending on the existence of a RequestParameter I would like to choose
> the
> > appropriate <map:aggregate> path. But I could not found any
> > RequestParameterExistsSelector. There is only
> RequestParameterExistsAction
> > that does not allow me to code a select-when-otherwise construct.
> why do you need when/when/otherwise syntax if the result of request
> parameter exists action/selection has only two states: either exists or
> not?
>
> --
> Leszek Gawron [EMAIL PROTECTED]
> IT Manager MobileBox sp. z o.o.
> +48 (61) 855 06 67 http://www.mobilebox.pl
> mobile: +48 (501) 720 812 fax: +48 (61) 853 29 65
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]