RE: URI Templates - optional variables?

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 UTC