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

Re: Updated URI Template proposal

From: Joe Gregorio <joe@bitworking.org>
Date: Fri, 9 Nov 2007 22:50:35 -0500
Message-ID: <3f1451f50711091950j76192fd1m26cf3da1ea2c0a48@mail.gmail.com>
To: URI <uri@w3.org>

One of the things I never made clear is that this proposal clears up
all the escaping issues and makes writing a parser very easy.
My working code uses the BNF to ensure that the BNF is correct, but
a simple implementation could get away with just splits, for example, in Python:

>>> "-op|arg|var1=def,var2=def2".split("|")
['-op', 'arg', 'var1=def,var2=def2']
>>> _[2].split(",")
['var1=def', 'var2=def2']
>>> [x.split("=") for x in _ if "=" in x]
[['var1', 'def'], ['var2', 'def2']]


On Nov 5, 2007 12:32 PM, Joe Gregorio <joe@bitworking.org> wrote:
> Based on everyone's feedback I've updated my proposal
> and updated the URI Template explainer service to reflect that proposal.
> Expansions are now of the form:

Joe Gregorio        http://bitworking.org
Received on Saturday, 10 November 2007 03:50:44 UTC

This archive was generated by hypermail 2.4.0 : Sunday, 10 October 2021 22:17:50 UTC