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

URI templates and "back references" - a question

From: John Kemp <john@jkemp.net>
Date: Mon, 22 Oct 2007 11:45:52 -0400
Message-ID: <471CC5B0.7070106@jkemp.net>
To: URI <uri@w3.org>


I have written some simple C code to process and match URI templates
against URIs. I'm using the "va_list" approach to create a C function
that takes a URI template (as a string) and a variable-length list of
string values to put into the template, creating a URI with all
substitutions made.

I can't tell from the specification whether this is a good idea ;)

But, for this usage, I don't really need named variables. I could
certainly choose to use distinct variable names anyway, and essentially
discard them during the substitution, but my usage seems a little
similar to the idea of backreferences in regular expressions, and I was
wondering whether it makes any sense to standardize a variable name for
when the name is not important, or for a specific ordering of values?


- John
Received on Tuesday, 23 October 2007 02:34:02 UTC

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