Re: URI Templates - embedded variables?

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;{redirect_to}

which gets expanded into something like this;

which the recipient knows to interpret as containing the template{token}

Is that along the lines of what you're thinking?


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 = '{bar}'
> At the moment I'm just treating the brackets as literal characters and
> escaping them:
> ''
> but I can imagine the intention in such a case to be for the variable
> to be evaluated:
> ''
> -- 
> Lindsay Evans

Mark Nottingham

Received on Monday, 30 July 2007 18:59:49 UTC