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

Re: URI Templates - optional variables?

From: Joe Gregorio <joe@bitworking.org>
Date: Fri, 2 Nov 2007 19:53:23 -0400
Message-ID: <3f1451f50711021653y2d98f5c8i8ded853211a3e805@mail.gmail.com>
To: "Jim Ancona" <jim@anconafamily.com>
Cc: uri@w3.org

On 10/31/07, Jim Ancona <jim@anconafamily.com> wrote:
>
> After working with Joe's syntax a bit, I like it. One area that seems a
> bit week is construct that support query variables.
>
> Optional variables aren't too bad:
>
> http://example.com/foo?{,&|opt1,opt2,opt3}
>
> I don't think there's a way to omit the '?' when no parameters are present.

You are correct, this would be fixed if the '?' operator took multiple
variables and inserted the text if any of the variables were defined,
or non-zero length lists.

   -joe

-- 
Joe Gregorio        http://bitworking.org
Received on Friday, 2 November 2007 23:53:38 GMT

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