RE: URI Templates - optional variables?

Roy:

> Actually, that one isn't very useful for resource description.
> An explicit list would be better:

I just read your first email offline and thought that was a little abstract.
Your revision is better.

Anyway, my one word response to both of your emails on the subject is:
Excellent!

-- 
-Mike Schinkel
http://www.mikeschinkel.com/blogs/
http://www.welldesignedurls.org
http://atlanta-web.org - http://t.oolicio.us




> -----Original Message-----
> From: uri-request@w3.org [mailto:uri-request@w3.org] On 
> Behalf Of Roy T. Fielding
> Sent: Wednesday, August 01, 2007 8:32 PM
> To: uri@w3.org
> Cc: Joe Gregorio
> Subject: Re: URI Templates - optional variables?
> 
> 
> On Aug 1, 2007, at 3:02 PM, Roy T. Fielding wrote:
> >    {%separator:hashvar}
> >         For each variable named in the value of hashvar (which could
> >         be a space-separated string or some context-dependent hash
> >         mechanism), if the named variable is defined and non-empty,
> >         then substitute the concatenation of variable name, "=",
> >         variable value.  If more than one substitution is made,
> >         separate each substitution with the string of non-colon
> >         separator characters between the '%' and ':'.
> >            E.g.,   myhash = "name age sex location"
> >                      name = "Fred"
> >                       age = "41"
> >                       sex = ""
> >                  location = "USA"
> >
> >            then  {%&:myhash} = "name=Fred&age=41&location=USA"
> 
> Actually, that one isn't very useful for resource description.
> An explicit list would be better:
> 
>     {,separator:var1,var2,var3,...}
>          For each variable named in the comma-separated list,
>          if the named variable is defined and non-empty, then
>          substitute the concatenation of variable name, "=",
>          variable value.  If more than one substitution is made,
>          separate each substitution with the string of non-colon
>          separator characters between the ',' and ':'.
>             E.g., name     = "Fred"
>                   age      = "41"
>                   sex      = ""
>                   location = "USA"
>          {,&:name,age,sex,location} = "name=Fred&age=41&location=USA"
> 
> I hope it is clear what the use cases for that would be.
> 
> ....Roy
> 

Received on Thursday, 2 August 2007 01:30:25 UTC