- From: Stefan Eissing <stefan.eissing@greenbytes.de>
- Date: Sat, 7 Oct 2006 11:45:44 +0200
- To: Mark Nottingham <mnot@mnot.net>
- Cc: Sam Ruby <rubys@intertwingly.net>, uri@w3.org
It seems to me that the data type of uri templates parameter would be
part of the template and not part of the input. The one designing the
template should know what goes where?
Am 07.10.2006 um 05:39 schrieb Mark Nottingham:
> Actually, by putting what's effectively an encoding type in the
> input data structure, we *can* have both;
>
> {
> 'a': ('foo/bar', PATH_SEGMENT),
> 'b': ('foo/bar', NULL),
> 'c': ('foo/bar', QUERY_STRING),
> }
> http://example.com/{a}/{b}?{c} --> http://example.com/foo%2f/foo/
> bar?foo/bar
>
here you declare how the input shall be treated as attribute of the
input. What about this:
('foo/bar', 'foo/bar', 'foo/bar')
http://example.com/{1ps}/{2}?{3q} --> http://example.com/foo%2f/foo/
bar?foo/bar
n - substitue n-th parameter unchanged
np - substitue n-th with uri escaping to make a valid path
nps - substitue n-th with uri escaping to make a valid path segment
nq - substitue n-th with uri escaping to make a valid query
Instead of positional, numbered parameters, one can apply the same to
named parameters, as in
http://example.com/{ps(a)}/{b}?{q(c)}
Cheers,
Stefan
Received on Saturday, 7 October 2006 09:45:56 UTC