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

URI Templates - embedded variables?

From: Lindsay Evans <lindsaye@gmail.com>
Date: Sun, 29 Jul 2007 12:32:08 +1000
Message-ID: <fa49b1fe0707281932k7443f5bbjf9f238799b972580@mail.gmail.com>
To: uri@w3.org

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/
Received on Monday, 30 July 2007 13:47:16 GMT

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