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

Re: URI Templates - optional variables?

From: John Cowan <cowan@ccil.org>
Date: Tue, 16 Oct 2007 00:34:54 -0400
To: James M Snell <jasnell@gmail.com>
Cc: John Cowan <cowan@ccil.org>, Marc Hadley <Marc.Hadley@Sun.COM>, "Roy T. Fielding" <fielding@gbiv.com>, URI <uri@w3.org>, Joe Gregorio <joe@bitworking.org>, Stefan Eissing <stefan.eissing@greenbytes.de>, Mark Nottingham <mnot@mnot.net>
Message-ID: <20071016043454.GC3867@mercury.ccil.org>

James M Snell scripsit:

> I've been working on that, and it's difficult to say the least.  The
> main challenge is not the template var's themselves, but in knowing
> exactly how to break things up so the right values get pick out of the
> right places.  I'm hoping to have something working by the end of the week.

Indeed, it can't be done in the general case unless you deliver multiple
results.  The template "/{foo}{bar}/ when matched against the URI
"/whatever/" can match 9 different ways.

-- 
A rose by any other name                            John Cowan
may smell as sweet,                                 http://www.ccil.org/~cowan
but if you called it an onion                       cowan@ccil.org
you'd get cooks very confused.          --RMS
Received on Tuesday, 16 October 2007 04:35:22 GMT

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