URI templates (was Re: fragment or sub-resources)

Hi all,

I checked out URI templates again today.

2009/9/7 Raphaël Troncy <Raphael.Troncy@cwi.nl>:
>> Now, as you can't know in advance if the server support a specific syntax
>> for getting sub-resources of a specific resource, we might want to signal
>> this using a URI template [1], as in that case it really sets expectations
>> for the client (note that it is an example on how to advertise that a server
>> would use our syntax for sub-resource).
>> Comments?
>>
>> [1] http://tools.ietf.org/html/draft-gregorio-uritemplate-03
>
> I still have trouble to understand how concretely that would work. Could
> you give us a *detailed* example of how the use of Gregorio's
> uritemplate will work in practice?


I think - after having read
http://lists.w3.org/Archives/Public/uri/2009May/0000.html and
http://uri-templates.googlecode.com/svn/trunk/spec/draft-gregorio-uritemplate-03.html#anchor1
that URI templates are just a better way of specifying the structure
of a URI that a server can parse. In our case it is an alternative to
the BNF that we wrote, I think. So, I think we can consider eventually
specifying a URI template for the different schemes that we come up
with. I think there would be a template for fragments and one for
queries. It will make it easier for servers to claim which format they
support. It may even be usable for "advertising" what they support.

Our temporal URI fragment addressing could, e.g. look like this

tscheme=["npt","smpt","smpte-25","smpte-30","smpte-30-drop","clock"]

 http://example.org/#t={tscheme}:{tspec} {-alt | {tspec} [ , {tspec} ]
|   , {tspec} }

Notice how I had to invent a new function called "-alt" because there
is no way to specify alternatives  with URI templates. Maybe the way
to do it is to make two URI templates out of it.

In any case, I think if somebody is keen to get the URI specification
available as a URI template, they can go ahead. I don't think they add
any additional value over the already existing BNF.

Cheers,
Silvia.

Received on Sunday, 20 September 2009 01:20:50 UTC