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

On 10/15/07, Mark Nottingham <mnot@mnot.net> wrote:
>
> 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

Ah, my bad, that should have been:

       http://bitworking.org/news/{&/|entry}
       entry := ['240', 'Newsqueak']
       http://bitworking.org/news/240/Newsqueak


   Thanks,
   -joe

-- 
Joe Gregorio        http://bitworking.org

Received on Monday, 15 October 2007 12:32:02 UTC