[whatwg] Proposing URI Templates for WebForms 2.0

Jerome Louvel jerome.louvel at noelios.com
Fri Oct 31 03:20:28 PDT 2008

Hi Ian,

It would just be easier to take advantage of them directly from HTML. Right
now, a Web form can already build a URI by adding query parameters to the
action URI of a GET form, why not go a bit further?

The benefit would be having more control over the construction of the URI
rather than just the query parameters. I could have a form with two simple
fields "a" and "b" and specify "http://test.org/customers/{a}/reports/{b}"
as the action URI.

When entering the values "foo" and "bar" and submitting the form, the target
URI would become "http://test.org/customers/foo/reports/bar". This would be
really slick to contact RESTful APIs.

If support for the complete URI templates RFC is too much for a first step,
this could be limited to a subset, like simple variable substitution maybe. 

The latest RFC is here:

Best regards,
Jerome Louvel
Restlet ~ Founder and Lead developer ~ http://www.restlet.org
Noelios Technologies ~ Co-founder ~ http://www.noelios.com

-----Message d'origine-----
De : Ian Hickson [mailto:ian at hixie.ch] 
Envoye : mardi 28 octobre 2008 20:20
A : Jerome Louvel
Cc : whatwg at lists.whatwg.org; uri at w3.org; rest-discuss at yahoogroups.com
Objet : Re: [whatwg] Proposing URI Templates for WebForms 2.0

On Fri, 12 Jan 2007, Jerome Louvel wrote:
> Even though the URI template RFC is not finalized yet, we already have a 
> complete support for it, on the server-side, in the Restlet framework. 
> We happily use them for our URI-based routing and I think they add a lot 
> of expressiveness while keeping a simple syntax. Usage example: 
> http://www.restlet.org/tutorial#part11
> They are also supported in WADL, the RESTful description language, and 
> in the OpenSearch specification. Extending their usage to HTML forms 
> sounds like a logical and useful step.

It seems to me like URI templates can be trivially done from script and 
from the server side already; given the poor backwards-compatibility story 
of URI templates, what do we gain from adding it to the language?

Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

More information about the whatwg mailing list