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

Re: URI Templates, percent-encoding, bnfs and working code

From: Mark Nottingham <mnot@mnot.net>
Date: Mon, 15 Oct 2007 17:07:16 +1000
Message-Id: <FA026457-6C3B-4534-98B8-5CF6D83F3EFC@mnot.net>
Cc: uri@w3.org
To: Joe Gregorio <joe@bitworking.org>


On 13/10/2007, at 12:22 PM, Joe Gregorio wrote:

>    What if the *only* way to get a reserved character into
>    the final URI was through templating expansions?

[...]

> So what does this experiment look like? Let's be as draconian as  
> possible:
>
>    1. Convert Unicode template values to UTF-8.
>    2. Percent-encode all characters outside unreserved.

[...]

> Does it work? Let's try all our previous examples:
>
> My blog template works out fine:
>
>       http://bitworking.org/news/{entry}
>       entry := '240/Newsqueak'
>       http://bitworking.org/news/240/Newsqueak
>
> All the searches do too:
>
>      http://www.google.com/search?q={term}
>      term := ben&jerrys
>      http://www.google.com/search?q=ben%26jerrys

[...]

> Internationaliztion is also covered:
>
>      http://www.google.com/search?q={term}
>      term := Îñţérñåţîöñåļîžåţîöñ
>       http://www.google.com/search?q=%C3%8E%C3%B1%C5%A3%C3%A9r%C3% 
> B1%C3%A5%C5%A3%C3%AE%C3%B6%C3%B1%C3%A5%C4%BC%C3%AE%C5%BE%C3%A5%C5% 
> A3%C3%AE%C3%B6%C3%B1

These examples don't seem consistent; by the rules above and the  
other examples, your blog entry should be:

       http://bitworking.org/news/240%2fNewsqueak

Or am I misunderstanding the proposal? If not, how would I produce a  
URI with a '/', '&' (etc.) sourced from a variable value?

Cheers,


--
Mark Nottingham     http://www.mnot.net/
Received on Monday, 15 October 2007 07:09:15 GMT

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