cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <stef...@apache.org>
Subject Re: accessing sitemap parameters in a flow script
Date Tue, 19 Aug 2003 17:50:08 GMT

On Friday, Aug 15, 2003, at 23:49 Europe/Rome, Sylvain Wallez wrote:

> Andreas Hartmann wrote:
>
>> Sylvain Wallez wrote:
>>
>> [...]
>>
>>>> <map:call function="foo">
>>>>   <map:parameter name="bar" value="baz"/>
>>>> </map:call>
>>>>
>>>> function foo(bar) {
>>>>     ...
>>>> }
>>>
>>>
>>> This syntax turns named parameters in the sitemap into positional 
>>> parameters of the function. This is likely to cause very confusing 
>>> bugs when someone considers that sitemap parameters are name 
>>> value-pairs, which they basically are. Note also that it's the 
>>> *only* place in the sitemap where parameter order is important.
>>>
>>> IMO, the use of cocoon.parameters should be encouraged. Furthermore, 
>>> cocoon.parameters is the only way to pass sitemap parameters to a 
>>> continuation.
>>
>>
>> Thanks, that's good to know!
>> I really thought it was a name-value mapping.
>
>
> And this really demonstrates how dangerous can be this translation to 
> positional parameter ;-)

why don't we fix this, then?

--
Stefano.


Mime
View raw message