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

Re: URI Templates - optional variables?

From: Stefan Eissing <stefan.eissing@greenbytes.de>
Date: Thu, 2 Aug 2007 00:30:55 +0200
Message-Id: <93AD2432-DF25-47C0-8916-3000AD8F93EC@greenbytes.de>
Cc: uri@w3.org
To: Marc Hadley <Marc.Hadley@Sun.COM>

Am 01.08.2007 um 19:02 schrieb Marc Hadley:
> I'd be interested to hear more about the use case for a URI  
> template that behaves in this way. E.g. I'd expect that:
> http://www.example.com/
> http://www.example.com/foo/
> would identify two quite different resources, whereas:
> http://www.example.com/foo/
> http://www.example.com/bar/
> *could* identify two instances of particular kind of resource. I'd  
> like to understand what is the planned use for a URI template that  
> can resolve to either of the first pair - why wouldn't you use two  
> different URI templates ?

I cannot speak for Mike. What I can see as use case would be a  
template describing a site's structure like


which is then used to generate

http://www.example.com/pictures/dan/cars/ - all of dan's car pics
http://www.example.com/pictures/dan/ - all of dan's pics

and maybe even

http://www.example.com/pictures/ - all of pics of all users

Of course this could also be done by using query parameters, but  
without the uris are easier to remember. I hope this explains it a bit.

Stefan Eissing

<green/>bytes GmbH
Hafenweg 16
D-48155 Münster
Amtsgericht Münster: HRB5782
Received on Wednesday, 1 August 2007 22:31:03 UTC

This archive was generated by hypermail 2.4.0 : Sunday, 10 October 2021 22:17:49 UTC