Note and examples on R2RML SQL identifier syntax disagree with normative text

This comment concerns Section 5 of the R2RML LC draft [1].

The normative parts of the section state that a SQL identifier must match the <identifier> production in the SQL spec. This matches both regular and delimited identifiers. This reflects the WG decision on ISSUE-35 [2] that was arrived at after considerable discussion.

However, the big Note box in Section 5 disagrees with the normative text. First:

[[
Note that in R2RML, column name specified as an RDF plain literal or within curly braces, is considered a delimited SQL identifier.
]]

The sentence is incorrect. Column names in R2RML can be both regular identifiers and delimited identifiers. To make it a delimited identifier, it has to be in double quotes, just as in SQL.

The note goes on to give several incorrect examples. To use the delimited identifier "dept_no", one has to do this:

  [] rr:xxx "\"dept_no\"".

To use the delimited identifier "Department Number" in a template, one has to do this:

  [] rr:template "http://data.example.com/department/{\"Department Number\"}".

The examples in the note imply that it would also work if the backslash-escaped double quotes are omitted, which is not the case.

I propose that the text of revision r1.149 of the editor's draft is reinstated as it didn't contain any of these confusions.

(The box is an informative note, so changing it wouldn't change the R2RML language.)

Best,
Richard

[1] http://www.w3.org/TR/2011/WD-r2rml-20110920/#logical-tables
[2] http://www.w3.org/2001/sw/rdb2rdf/track/issues/35

Received on Tuesday, 20 September 2011 17:13:53 UTC