RE: [whatwg] Proposing URI Templates for WebForms 2.0

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 "{a}/reports/{b}"
as the action URI.

When entering the values "foo" and "bar" and submitting the form, the target
URI would become "". 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 ~
Noelios Technologies ~ Co-founder ~

-----Message d'origine-----
De : Ian Hickson [] 
Envoye : mardi 28 octobre 2008 20:20
A : Jerome Louvel
Cc :;;
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: 
> 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       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Friday, 31 October 2008 10:21:26 UTC