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

Re: URI and IRI Templating - encoding defaults

From: Stefan Eissing <stefan.eissing@greenbytes.de>
Date: Wed, 17 Jan 2007 10:03:01 +0100
Message-Id: <32A869FB-F225-4EC0-9A83-373AF59A7593@greenbytes.de>
Cc: "'Mark Nottingham'" <mnot@mnot.net>, <uri@w3.org>
To: Mike Schinkel <mikeschinkel@gmail.com>

Since Mark is busy with caches, I take a stab at it:

Am 16.01.2007 um 18:18 schrieb Mike Schinkel:

>
> Mark Nottingham wrote:
>> ---8<---
>> * The Foo URI Template
>>
>> Foo is a URI template [RFCxxxx] that allows two (2) variables, "bar"
>> and "baz". For example;
>>
>> <http://www.example.com/{bar}?arg={baz}>
>>
>> The "bar" template variable should have any characters from the sub-
>> delim rule in [RFC3986] percent-encoded before template expansion.
>>
>> The "baz" template variable should percent-encode the "&" and "#"
>> characters before template expansion.
>> --->8---
>
> I get lost on some of this stuff.  Are you saying that
>
> 	bar="main"
> 	baz="us&arg2=ca#below-the-fold"
> 	http://www.example.com/{bar}?arg={baz}
>
> Would end up looking like this
>
> 	http://www.example.com/main?arg=us%26arg2%3Dca%23below-the-fold
>
> And NOT like this:
>
> 	http://www.example.com/main?arg=us&arg2=ca#below-the-fold
>
> Correct?

I think the gist is that any special escape rules are part of the  
documentation of a specific template. So, when you follow the  
template documentation, you end up with your first uri.

That does however not restrict other templates. So you can define a  
Foo2 URI Template which has different rules.

That's how I understood Mark. Any errors are purely mine.

Cheers,

Stefan
Received on Wednesday, 17 January 2007 09:03:08 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:25:10 UTC