- From: Mike Burrows <asplake@googlemail.com>
- Date: Sun, 23 Aug 2009 11:23:41 +0100
- To: "Roy T. Fielding" <fielding@gbiv.com>
- Cc: Mark Nottingham <mnot@mnot.net>, Joe Gregorio <joe@bitworking.org>, URI <uri@w3.org>
Thanks again. Couple of comments now that I've had a change to build the doc: 1) It would be very useful to be able to specify that a variable is mandatory, to prevent invalid expansions such as http://users/{userid}/settings to http://users//settings (not to mention others that look less clearly invalid but are still not the intention of the template) This will give much more reliable feedback to the client than a server-side validation ever could. This can be achieved without changing the syntax simply by specifying that an error is raised by a Simple or Reserved substitution, if the variable has not been assigned and no default value is specified. Nothing is lost with my proposal - this template: http://users/{userid=} will expand in the unassigned case to be http://users/ Others may have good reasons to propose additional syntax though. 2) Can (or should) the new syntax have a neat way (or any way at all!) to support things like optional file extensions? Like them or loathe them they're important out there in the wild - try modeling a multi-format Rails application efficiently without them. In the old syntax {-prefix|.|format} did the trick nicely; something like {.format} might be a good fit now (it's in the spirit of the new / operator) but perhaps it could be generalised. Or did I miss a trick in the new syntax? Regards, Mike 2009/8/21 Roy T. Fielding <fielding@gbiv.com>: > 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 Sunday, 23 August 2009 10:24:21 UTC