- From: Richard Cyganiak <richard@cyganiak.de>
- Date: Sat, 30 Jun 2012 15:07:43 +0100
- To: Boris Villazón-Terrazas <bvillazon@fi.upm.es>
- Cc: Public-Rdb2rdf-Wg RDB2RDF <public-rdb2rdf-wg@w3.org>
Hi Boris,
I've spotted a few bugs in the R2RML test suite. I've used the latest test suite from hg. One bug makes the test mapping invalid. A couple others violate SHOULD-level requirements without a good reason.
Best,
Richard
== R2RMLTC0014b ==
The mapping file contains the following SQL query as an R2RML view:
SELECT ('http://example.com/emp/' || "empno") AS empURI
, "empno"
, "ename"
, ('http://example.com/emp/job/'|| "job") AS jobTypeURI
, "job"
, deptno
, ('http://example.com/emp/etype/'|| "etype") AS empTypeURI
, "etype"
, ('http://example.com/graph/'|| "job" || '/' || "etype") AS graphURI
FROM "EMP"
deptno needs to be enclosed in double quotes to match the table definition.
== R2RMLTC0005a ==
== R2RMLTC0011a ==
== R2RMLTC0013a ==
They use the following template:
http://example.com/{"fname"}-{"lname"}
http://example.com/{ID}/{FirstName}-{LastName}
http://example.com/Person/{"ID"}/{"Name"}-{"DateOfBirth"}
Such templates SHOULD NOT be used because “-” is not a safe separator if fname or lname ever contains a dash:
http://www.w3.org/TR/r2rml/#dfn-safe-separator
I suggest replacing the dashes with any IRI delim or sub-delim character, for example:
http://example.com/{"fname"}+{"lname"}
http://example.com/{"fname"};{"lname"}
http://example.com/{"fname"}/{"lname"}
== R2RMLTC0005b ==
== R2RMLTC0012a ==
== R2RMLTC0012b ==
== R2RMLTC0012e ==
They use templates like the following:
{"fname"}{"lname"}
Such templates SHOULD NOT be used. The empty string is not a safe separator. Strings generated from such templates cannot be reversed.
I suggest adding a separator that is unlikely to occur in the used columns, for example:
{"fname"}|{"lname"}
{"fname"}_{"lname"}
== R2RMLTC0006a ==
== R2RMLTC0014c ==
Both use term maps with rr:constant, and specify an rr:termType:
rr:objectMap [ rr:constant "Bad Student"; rr:termType rr:Literal; ]
Specifying rr:termType has no effect on a constant-valued term map. It only affects column- and template-valued term maps:
http://www.w3.org/TR/r2rml/#termtype
This is because the term type for a constant-valued term map is simply determined by the constant node. "Bad Student" is a literal, so the resulting term is a literal.
As the spec states: “An R2RML mapping graph SHOULD NOT include IRIs from the R2RML vocabulary where such use is not explicitly allowed or required by a clause in this specification.” Hence I suggest removing these rr:termType triples.
Received on Saturday, 30 June 2012 14:08:07 UTC