cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Haul <>
Subject Re: [Patch][C2.1] sitemap redirections + target spec
Date Thu, 21 Jun 2001 10:39:05 GMT
On 20.Jun.2001 -- 04:20 PM, Vadim Gritsenko wrote:
> I would not say why not to use <map:parameters> as elsewhere else...
> Like:
>     <map:match pattern="test">
>       <map:act type="form-validator">
>          <map:parameter name="descriptor" value="context:///descriptor.xml"/>
>          <map:parameter name="validate-set" value="user-input"/>

>  	   <map:redirect-to resource="simple-page">
>             <map:parameter name="target" value="OK"/>
>          </map:redirect-to>

>       </map:act>
>       <map:redirect-to resource="simple-page">
>           <map:parameter name="target" value="ERROR"/>
>       </map:redirect-to>
>     </map:match>
> This would be much more consistent.

Vadim, yes that's right. I have reworked the patch so that it stores
the target value with key "target" and that it uses the get-parameter
template which is what other templates use as well. This way target
can be specified either as attribute or as child element.

BUT get-parameter looks for <map:param name="target"></map:param> as
opposed to <map:parameter name="target" value=""/>

Two reasons why I wouldn't like to change this:
1) <map:parameter> is used with elements that can take an arbitrary
   number of parameters depending only on the instantiated class while
   here it is an optional attribute but there's not going to be
   another implementation of <map:redirect-to> at least it is not likely
   to have one configurable by the user.

2) I intent to use it in a setting where there's already a rather deep
   and complex tree and I would be glad to have this be a one-liner
   :-) Otherwise I could have written an action to create and fill a
   new map. Of cause there are other (negative) implications on that
   path so that wouldn't be a bright idea. 

Of cause this is only my opinion and I will support whatever the core
developers decide on this.

Anyway, thanks for the hint.


C h r i s t i a n       H a u l
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

View raw message