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

Re: Feedback on draft-gregorio-uritemplate-00

From: James M Snell <jasnell@gmail.com>
Date: Sat, 07 Oct 2006 09:17:03 -0700
Message-ID: <4527D2FF.6020406@gmail.com>
To: Mark Nottingham <mnot@mnot.net>
CC: Bjoern Hoehrmann <derhoermi@gmx.net>, uri@w3.org

I most definitely do NOT want to turn this into a schema language for
URIs.  What I want is a sequence of characters in the { } 's that are
opaque to the template processor but meaningful to the application
context supplying the values.

Mark said:
> I appreciate the attraction of putting the datatype in the template,
> but consider the situation if you leave it outside. Every use of URI
> Templates is going to have to define the semantics and processing of
> each variable name somewhere else anyway; they'll have to say "'a' is
> the username, and should be at most 8 characters long...".  Since
> there needs to be external information like this anyway, putting the
> encoding information there as well is the simplest, most flexible
> approach that hits the 80% case.

+1.

In my own experimentation, I've implemented template value resolvers
that are based on simple name, XPath and regex patterns expressed in
template names, e.g.,

  {abc}
  {/a/b/c[@foo]}
  {\d+}

I was able to get this implemented with very few problems and still see
a tremendous amount of potential value in broadening the range of
characters allowed in a template-name so that we can do these types of
things.  However, the current definition is a compromise for the sake of
simplicity and readability that I think is very important.  When we
start trying to embed data typing, default values, encoding rules, etc
directly in the { }'s, simplicity and readability go right out the window.

- James

Mark Nottingham wrote:
> 
> No, I don't want to do those things with URI template, others do. My use
> cases are remarkably simple.
> 
> As far as WSDL 2.0 is concerned, I think my feelings are well-known.
> 
> 
> On 2006/10/07, at 8:13 AM, Bjoern Hoehrmann wrote:
> 
>> * Mark Nottingham wrote:
>>> One of the things we found when talking through URI templates is that
>>> there are a a *wide* variety of use cases for annotations,
>>> conventions, etc. in template variables; e.g., whether to percent-
>>> encode, whether something is optional, constraints on the value
>>> space, whether to include the variable name in a query arg, etc. So,
>>> whatever convention you use here, it needs to be extensible.
>>
>> This sounds like you should talk to the Working Group trying to get
>> WSDL 2.0 to Recommendation. You want to do pretty much what their
>> language is designed for, but don't want to use their technology.
>> --Björn Höhrmann · mailto:bjoern@hoehrmann.de ·
>> http://bjoern.hoehrmann.de
>> Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
>> 68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/
> 
> 
> -- 
> Mark Nottingham     http://www.mnot.net/
> 
> 
> 
Received on Saturday, 7 October 2006 16:17:25 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:25:10 UTC