Re: URI Template experience

I'll might attempt a draft myself if that's what it takes and it's OK with
the copyright holders!  Shall I?

May I suggest we start with the table in section 1.2 of the in-progress
draft (revision 45)?  Here are some annotated updates:

[1] Added/changed for completeness/clarity
[2] Proposed previously
[3] Explain what the "*" does here?
[4] Explain what the "+" does here, and how did "/list" find its way into
the expansion?
[5] Is this defined?

.-----------------------------------------------------------------.
| Sec | Op  | Description                                         |
|     |     |    Expression      | Expansion                      |
|-----+-----+-----------------------------------------------------|
| 3.3 |     | Simple expansion with comma-separated values        |
|     |     |                                                     |
|     |     |    {var}             value                          |
|     |     |    {hello}           Hello%20World%21               |
|     |     |    {path}/here       %2Ffoo%2Fbar/here              |
|     |     |    {x,y}             1024,768                       |
|     |     |    {var=default}     value                          |
|     |     |    /{empty}/         //                             | [1]
|     |     |    /{undef=default}/ /default/                      | [1]
|     |     |    /{undef=}/        //                             | [1]
|     |     |    /{undef}/         (error condition)              | [2]
|     |     |                                                     |
|-----+-----+-----------------------------------------------------|
| 3.4 |  +  | Reserved expansion with comma-separated values      |
|     |     |                                                     |
|     |     |    {+var}            value                          |
|     |     |    {+hello}          Hello%20World!                 |
|     |     |    {+path}/here      /foo/bar/here                  |
|     |     |    {+path,x}/here    /foo/bar,1024/here             |
|     |     |    {+path}{x}/here   /foo/bar1024/here              |
|     |     |    {+empty}/here     /here                          |
|     |     |    {+undef}/here     (error condition)              | [2]
|     |     |                                                     |
|-----+-----+-----------------------------------------------------|
| 3.5 |  ;  | Path-style parameters, semicolon-prefixed           |
|     |     |                                                     |
|     |     |    {;x,y}            ;x=1024;y=768                  |
|     |     |    {;x,y,empty}      ;x=1024;y=768;empty            |
|     |     |    {;x,y,undef}      ;x=1024;y=768                  |
|     |     |                                                     |
|-----+-----+-----------------------------------------------------|
| 3.6 |  ?  | Form-style parameters, ampersand-separated          |
|     |     |                                                     |
|     |     |    {?x,y}            ?x=1024&y=768              |
|     |     |    {?x,y,empty}      ?x=1024&y=768&empty=   |
|     |     |    {?x,y,undef}      ?x=1024&y=768              |
|     |     |    {?list}           ?list=val1,val2,val3           |
|     |     |    {?keys*}          ?key1=val1&key2=val2       | [3]
|     |     |    {?keys+}          ?keys.key1=val1&keys.key2=val2 | [4]
|     |     |                                                     |
|-----+-----+-----------------------------------------------------|
| 3.7 |  /  | Hierarchical path segments, slash-separated         |
|     |     |                                                     |
|     |     |    {/var}            /value                         |
|     |     |    {/list}           /val1,val2,val3                |
|     |     |    {/list*}          /val1/val2/val3                | [3]
|     |     |    {/list*,x}        /val1/val2/val3/1024           | [3]
|     |     |    {/list+}          /list/val1/val2/val3           | [4]
|     |     |    x{/empty_list}    x or x/?                       | [5]
|     |     |    x{/undef}         x or x/?                       | [5]
|     |     |                                                     |
|-----+-----+-----------------------------------------------------|
| 3.x |  .  | Dot-prefixed components                             | [2]
|     |     |                                                     |
|     |     |    x{.var}           x.value                        |
|     |     |    x{.empty}         x.                             |
|     |     |    x{.list}          x.val1.val2.val3               |
|     |     |    x{.list*}         x.val1.val2.val3               | [3]
|     |     |    x{.list*,x}       x.val1.val2.val3.1024          | [3]
|     |     |    x{.list+}         x.list.val1.val2.val3          | [4]
|     |     |    x{.empty_list}    x                              |
|     |     |    x{.undef}         x                              |
|     |     |                                                     |
`-----+-----+-----------------------------------------------------'


Regards,
Mike
mjb@asplake.co.uk
http://positiveincline.com
http://twitter.com/asplake



On 25 February 2010 20:01, Eran Hammer-Lahav <eran@hueniverse.com> wrote:
> Any ETA on this becoming a published draft?
>
> EHL
>
>> -----Original Message-----
>> From: uri-request@w3.org [mailto:uri-request@w3.org] On Behalf Of Roy T.
>> Fielding
>> Sent: Friday, August 21, 2009 12:51 PM
>> To: mjb@asplake.co.uk
>> Cc: Mark Nottingham; Joe Gregorio; URI
>> Subject: Re: URI Template experience
>>
>> On Aug 20, 2009, at 11:31 PM, Mike Burrows wrote:
>>
>> > Has there been any progress on URI Templates since the last flurry of
>> > mails in early June?  Would a sneak preview of the new syntax be
>> > possible?
>>
>> I actually did a lot of work on it just prior to the IETF deadline, but
failed to
>> make it far enough for a new draft before needing to switch back to
httpbis.
>> You can see it in the work area:
>>
>> http://uri-templates.googlecode.com/svn/trunk/spec/
>>
>> draft-gregorio-uritemplate.xml
>>
>> I will swap back in soon,
>>
>> ....Roy
>
>
>

Received on Thursday, 25 February 2010 21:16:58 UTC