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

Mixing template variable vocabularies?

From: Mark Nottingham <mnot@mnot.net>
Date: Sat, 20 Oct 2007 09:47:21 +1000
Message-Id: <3E88A1A3-6446-4C30-945F-E3A5A9298EBE@mnot.net>
To: URI <uri@w3.org>

One of the use cases I have for URI templates is shoving them around  
in HTTP headers (e.g., the Link-Template header <http://www.mnot.net/ 
drafts/draft-nottingham-http-link-header-00.txt>) to build ad hoc,  
link-rich protocols. E.g., what's sketched out in <http:// 
lists.w3.org/Archives/Public/uri/2007Jul/0039.html>.

In that approach, the template variable names are grounded by the  
link relation itself; e.g., the 'token-login' link relation says that  
it expects the 'token' variable to be in the template. As such, the  
variables in use are defined by and bound to the link relation.

Question: do people have use cases where this doesn't work? Are there  
times where a link relation (perhaps an existing one) doesn't know  
all of the possible parameters to a link?

For example, a case where you want to construct a URI for a generic  
service (e.g., an APP endpoint), but want to put some site-specific  
variables into the template, like a user or group identifier  
(effectively mixing template variable vocabularies).

If we do want to cover cases like this, it seems like we'll need some  
way to individually scope the name space of a template variable,  
rather than assuming that they're all in the same one.

Cheers,

--
Mark Nottingham     http://www.mnot.net/
Received on Friday, 19 October 2007 23:49:19 GMT

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