- From: Lindsay Evans <lindsaye@gmail.com>
- Date: Tue, 31 Jul 2007 11:58:53 +1000
- To: "Mark Nottingham" <mnot@mnot.net>
- Cc: uri@w3.org
Hi Mark, That's pretty much exactly what I was thinking. On further thought it seems that the choice between escaping or further evaluating the variables would be best left as an option as per section 3.3 of the draft, as I can foresee cases where either would be appropriate. On 7/31/07, Mark Nottingham <mnot@mnot.net> wrote: > G'day Lindsay, > > I've got a somewhat similar use case, where I want to pass a template > through to another server for processing. So, you might start with > something like this; > http://example.com/login?{redirect_to} > > which gets expanded into something like this; > http://example.com/login?http://other.example.net/target/%7btoken%7d > > which the recipient knows to interpret as containing the template > http://other.example.net/target/{token} > > Is that along the lines of what you're thinking? > > Cheers, > > > > On 28/07/2007, at 7:32 PM, Lindsay Evans wrote: > > > > > Hi all, > > > > As I've been building something that makes use of a similar concept to > > URI Templates, I thought I'd have a crack at building an > > implementation in Ruby. > > > > I've had a look through the list archives, but haven't seen this > > mentioned: what is the expected behaviour when a variable is embedded > > in another variable? > > > > e.g. > > foo = 'xyz' > > bar = 'foo={foo}' > > template = 'http://example.com/?{bar}' > > > > At the moment I'm just treating the brackets as literal characters and > > escaping them: > > 'http://example.com/?foo=%7Bfoo%7D' > > > > but I can imagine the intention in such a case to be for the variable > > to be evaluated: > > 'http://example.com/?foo=xyz' > > > > -- > > Lindsay Evans > > http://linz.id.au/ > > > > > > > -- > Mark Nottingham http://www.mnot.net/ > > -- Lindsay Evans http://linz.id.au/
Received on Tuesday, 31 July 2007 01:58:57 UTC