W3C home > Mailing lists > Public > uri@w3.org > October 2007

Re: URI Templates - optional variables?

From: Mark Nottingham <mnot@mnot.net>
Date: Tue, 16 Oct 2007 09:36:08 +1000
Message-Id: <08F4D9A9-ED87-4198-B184-0C0F926F8274@mnot.net>
Cc: uri@w3.org
To: Joe Gregorio <joe@bitworking.org>


On 15/10/2007, at 11:03 PM, Joe Gregorio wrote:

>
> On 10/15/07, Mark Nottingham <mnot@mnot.net> wrote:
>> That's what I've been saying all along -- obviously not very well :)
>>
>> IIRC, the issue that we never really resolved is invoking the
>> template rules; i.e. deciding when to look for and apply the special
>> syntax.
>>
>> We can come up with a library of rules for different scenarios (good
>> start in the other thread, btw), but we'll never be able to cover all
>> of the specialist cases. As such, there needs to be a way for a
>> template variable to specify additional processing, and for template
>> processing engines to be extended.
>
> Additional processing? No. But we can provide a mechanism by which
> new operators can be added. There's plenty of room for future  
> extensions,
> since every char outside unreserved and !?|'&<> can be used as a  
> new operator.

Right. So how do you manage that name space?

> An alternative to the current proposal is to replace the
> single character operators with names, that is:
>
>    {<arg|var}  ->   {?prefix?arg|var}
>    {>arg|var}  ->   {?append?arg|var}
>    {,arg|var}  ->    {?join?arg|var}
>    {&arg|var}  ->   {?joinlist?arg|var}
>
> etc.
>
> This makes new operators easier to add and we don't have to
> worry about running out of characters.
> Of course, that's a very english-centric solution, and
> the original proposal has the advantage of being uniformly
> cryptic to everyone.

I like the expanded space, not as worried about being english-centric  
(many protocols are, and it's not really end-user visible).


--
Mark Nottingham     http://www.mnot.net/
Received on Monday, 15 October 2007 23:38:14 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 13 January 2011 12:15:37 GMT