W3C home > Mailing lists > Public > uri@w3.org > February 2010

URI Template error handling

From: Joe Gregorio <joe@bitworking.org>
Date: Fri, 26 Feb 2010 10:12:37 -0500
Message-ID: <a23d87fa1002260712k44b7f217i91094bf0ec1bab4b@mail.gmail.com>
To: URI <uri@w3.org>
Section 2.2

  The operator characters pipe ("|"), exclamation ("!"), and at-sign ("@") are
  reserved for future extensions. A processor that unexpectedly encounters
  such an extension operator should flag the expression as an error and include
  it in the result without expansion.

The use of the term 'error' here contradicts its use in Section 3:

  If a template processor encounters an error, such as an operator that it
  does not understand or a character sequence that does not match
  the <URI-Template> grammar, then processing of the template SHOULD
  cease, the URI-reference result SHOULD be undefined, and the location
  and type of error SHOULD be indicated to the invoking application.

That is, since an error was encountered the result SHOULD be undefined, so
there's no result in which to include the unexpanded expression. I suggest
the following rewordings

Section 2.2:

  The operator characters pipe ("|"), exclamation ("!"), and at-sign ("@") are
  reserved for future extensions. A processor that unexpectedly encounters
  such an extension operator should pass the expression through unexpanded.
  It MAY also indicate a warning to the invoking application.

Section 3:

  If a template processor encounters an error, such as an operator that it
  does not understand or a character sequence that does not match
  the <URI-Template> grammar, then processing of the template SHOULD
  cease, the URI-reference result SHOULD be undefined, and the location
  and type of error SHOULD be indicated to the invoking application.
If a template
  processor encounters a warning, such as the use of an operator character
  reserved for future extension, then the processing of the template SHOULD NOT
  cease, and the location and type of warning SHOULD be indicated to the
  invoking application.

   Thanks,
   -joe
Received on Friday, 26 February 2010 15:13:09 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:25:14 UTC