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

uri templates: {?var}

From: Manger, James H <James.H.Manger@team.telstra.com>
Date: Thu, 14 Jul 2011 00:17:10 +1000
To: "Roy T. Fielding" <fielding@gbiv.com>, URI <uri@w3.org>
Message-ID: <255B9BB34FB7D647A506DC292726F6E11288F38D64@WSMSG3153V.srv.dir.telstra.com>
It is great to see some more progress on URI templates <draft-gregorio-uritemplate-05>. Thanks Roy.

The form-style query expansions {?var} needs to substitute '?' or '&' based on whether or not a '?' already appears in the URI output string being constructed. The text about the '?' operator in 1.1 "Overview" isn't clear on this point. It says '?' is used for the first variable with a defined value in the expression. This is true for the specific example used in the overview, but not true in general (when a template might have some query parameters as literals).

Suggested text:

  For each variable in ['query', 'number'] that has a defined value:
  substitute "?" or "&"; the variable name; "="; and the variable's
  value. The initial character substituted is "?" if, and only if,
  no "?" is already present in the URI output string being built.

James Manger
Received on Wednesday, 13 July 2011 14:17:45 UTC

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