Stefano Mazzocchi wrote:

> Sylvain Wallez wrote:
>
>> This can often happen with matchers when e.g. an area of the 
>> application is protected :
>>
>> <map:match type="wildcard" pattern="admin/*">
>>  <map:act type="auth">
>>    <map:match type="wildcard" pattern="admin/adduser">
>>      ...
>>    </map:match>
>>  </map:act>
>> </map:match>
>
>
> Ok, good point.
>
>> So explicit naming as proposed by Ilya finally seems the best 
>> approach to me, as it removes all possible ambiguities at the price 
>> of a little added verbosity. Since this added verbosity only happens 
>> when this feature is used, this actually does no harm.
>
>
> Agreed.
>
>> Let's see now how we can write that...
>
>
> [skipped my tries]
>
>> Puke, puke, puke ;-))
>
>
> :-Prrr
>
>> You're trying to find an alternative to the ':' which is used to 
>> separate the prefix from the attribute name, because you make the 
>> assumption that what's before the ':' *is* an inputmodule name.
>>
>> But isn't it precisely this prefix (i.e. the namespace) that should 
>> be used to distinguish between inputmodules and sitemap variables ? 
>> If yes (and I think so), this means we have to find a naming 
>> convention for the prefix, and not for the separator.
>>
>> You may puke (if you still can ;-), but what about considering 
>> sitemap-defined namespaces as internal to the sitemap, and thus 
>> prefix them with a "#", that we all know as being used for internal 
>> links in web pages ?
>>
>> This would lead to (adapted from Ilya's proposal) :
>>
>> <map:match pattern="*-*" name="mtch1">
>>  <map:act type="my-action" name="act1">
>>    <map:generate type="serverpages" src="{#mtch:1}.xsp">
>>      <map:parameter name="display" value="{#mtch:2}"/>
>>      <map:parameter name="param1" value="{#act1:1}"/>
>>      <map:parameter name="param2" value="{#act1:2}"/>
>>      <map:parameter name="param3" value="{request:1}"/>
>>      <map:parameter name="param4" value="{1}"/>
>>    </map:generate>
>>  </map:act>
>> </map:match>
>>
>> Explanation :
>> - {#mtch1:xxx} come from statement named "mtch1"
>> - {#act1:xxx} come from statement named "act1"
>> - {request:xxx} come from input-module "request"
>> - {xxx} works as usual and gets its value from the enclosing statement.
>>
>> I changed "param-prefix" proposed by Ilya to "name" since this is 
>> actually what it is : a name given to a sitemap statement.
>>
>> Thoughts ?
>
>
> know what? I like it. It seems a pretty nice solution and the use of 
> anchor-like syntax is simple and understandable.
>
> So you get my +1 on this.


Aaah ! Finally, someone agrees with someone else's proposal in this 
thread ! Are we going to reach a consensus ?

What do others think ?

Sylvain

-- 
Sylvain Wallez
  Anyware Technologies                  Apache Cocoon
  http://www.anyware-tech.com           mailto:[EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to