URI Templates

Joe Gregorio

Update (2017): URI Templates are done and now available as RFC6570. Many of the links below may have rotted.

I've been working over the past couple months with DeWitt Clinton, Mark Nottingham, Marc Hadley, Dave Orchard, and James Snell on a draft specification for URI Templates, which finally got published yesterday. To provide feedback on this Internet-Draft, join the W3C URI mailing list, and just like I've done for the Atom Publishing Protocol I'll keep a URI Template project page open that will always points to the latest version.

URI Templates are a simple idea that I covered back in April of last year in Constructing or Traversing URIs?, allowing you to parametrize a URI with variables that you would substitute in order to generate a URI. For example, if you knew your userid was 'fred' and you were given a URI template of the form:


You could do the substitution and get a URI:


They show up in lots of places, like Open Search, WADL, even in WSDL, and there are more places where they'll be showing up in the future. Instead of having everyone define slightly different mechansism we decided to sit down and spec it out in the hopes that it will increase interop and make it easier for other specifications to adopt URI Templates.

See DeWitt, Mark, and James for more info.

Also see James on URI Templates in XML.

comments powered by Disqus