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

Re: Alternative URL template proposal

From: DeWitt Clinton <dewitt@unto.net>
Date: Fri, 9 Nov 2007 19:22:13 -0800
Message-ID: <77facc500711091922s24e9b6aw6771fb1a3b92fe3e@mail.gmail.com>
To: "Joe Gregorio" <joe@bitworking.org>
Cc: uri@w3.org

On 11/9/07, Joe Gregorio <joe@bitworking.org> wrote:
> On Nov 9, 2007 9:26 PM, DeWitt Clinton <dewitt@unto.net> wrote:
> >   http://example.com/{categories+/}
> >   http://example.com/uri/atom/search
>
> I believe the grammar is ambiguous. For example,
> if I have the template:
>
>    http://example.com/{name1,name2+}
>
> And
>    name1 := "fred"
>    name2 := "barney"
>
> Does that expand to:
>
>    http://example.com/fred+barney
>
> or
>
>    http://example.com/fred&barney

http://example.com/fred&barney

Because:

  <separator> ::=  <unreserved-char> | "(" <ungrouped> ")"

And "+" is a reserved char.    If you wanted the "+", you'd need:

  http://example.com/{name1,name2(+)}


> There are also escaping issues. For example,
> what if I want to emit ')' as part of a prefix?

You can't.  It's not possible in my current proposal.

However, you could simply put the "()" before the template in the URL.

  http://example.com/(perens){foo?}

I'd love to see a reasonable use-case where the () are necessary in
the prefix.  If they are exceedingly rare then I'd be okay living
without them...


For the record, I'm generally +1 on your last draft.   I think it works well.

-DeWitt
Received on Saturday, 10 November 2007 03:22:23 GMT

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