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

RE: URI Templates - optional variables?

From: Mike Schinkel <mikeschinkel@gmail.com>
Date: Mon, 30 Jul 2007 13:55:46 -0400
To: <uri@w3.org>
Message-ID: <010101c7d2d2$dd6e0a90$0702a8c0@Guides.local>

I'm really excited to see activity with URI Template. However, I was
disappointed to see no incorporation of optional variables.  I'll explain
what I envision by example:

1.) http://www.example.com/{foo?}/

For foo="bar", URL=  http://www.example.com/bar/
For foo="" or foo=null, URL=  http://www.example.com/  (no double
forward-slash)

2.) http://www.example.com/?foo={foo?}

For foo="bar", URL=  http://www.example.com/?foo=bar
For foo="" or foo=null, URL=  http://www.example.com/  (no question mark)

3.) http://www.example.com/?foo={foo?}&bar={bar?}

For foo=1 and bar=2, URL=  http://www.example.com/?foo=1&bar=2
For foo= and bar=2, URL=  http://www.example.com/?bar=2  (no foo, no
ampersand)
For foo=1 and bar=, URL=  http://www.example.com/?foo=1  (no bar, no
ampersand)
For foo= and bar=, URL=  http://www.example.com/  (no foo, bar, question, or
ampersand)

This would have real world value and hope everyone can consider this. I'll
be happy to do the writeup to incorporate into the draft assuming someone
will mentor me on the process.

-- 
-Mike Schinkel
http://www.mikeschinkel.com/blogs/
http://www.welldesignedurls.org
http://atlanta-web.org - http://t.oolicio.us
Received on Monday, 30 July 2007 17:56:10 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 13 January 2011 12:15:37 GMT