- From: Tomasz Pluskiewicz <tomasz.pluskiewicz@gmail.com>
- Date: Sat, 25 Aug 2012 11:26:14 +0200
- To: Richard Cyganiak <richard@cyganiak.de>
- Cc: Boris Villazon-Terrazas <bvillazon@fi.upm.es>, public-rdb2rdf-comments@w3.org
Thank you Richard, I have seen this section and I'm not sure it is absolutely clear. However the test harness makes it very clear what the results should be and so I leave this behaviour configurable. I have one last question with a related issue: In test #R2RMLTC0019b there should be a data error and I'm not sure I understand why. It says "Test the generation of triples by using IRI value in columns". Why is an IRI field value invalid for subject map? It's term type is rr:IRI and the column value is a valid IRI. According to http://www.w3.org/TR/r2rml/#dfn-term-generation-rules: [...] if the term map's term type is rr:IRI: 1. [...] 2. If value is a valid absolute IRI [RFC3987], then return an IRI generated from value. The value "http://example.com/ns#Jhon" is a valid absolute IRI so why not generate the triple below? Or does the data error occur in the object? <http://example.com/ns#Jhon> <http://xmlns.com/foaf/0.1/name> "http://example.com/ns#Jhon" Thanks, Tomasz On Fri, Aug 17, 2012 at 1:20 PM, Richard Cyganiak <richard@cyganiak.de> wrote: > Tomasz, > > On 17 Aug 2012, at 07:57, Tomasz Pluskiewicz wrote: >> The thing is test case #R2RMLTC0020b expects no output >> file. The data error section does not explicitly state that any >> further processing of the triples map should be aborted. Is it the >> assumed default behavior that if any data error occurs the triples map >> should produce no output at all? > > To quote from the spec: > > [[ > When providing access to the output dataset, an R2RML processor must abort any operation that requires inspecting or returning an RDF term whose generation would give rise to a data error, and report an error to the agent invoking the operation. A conforming R2RML processor may, however, allow other operations that do not require inspecting or returning these RDF terms, and thus may provide partial access to an output dataset that contains data errors. Nevertheless, an R2RML processorshould report data errors as early as possible. > ]] > http://www.w3.org/TR/2012/PR-r2rml-20120814/#dfn-data-error > > Does this answer your question? > > Best, > Richard > > >> >> Regards, >> Tomasz >> >> On Fri, Aug 17, 2012 at 12:18 AM, Boris Villazon-Terrazas >> <bvillazon@fi.upm.es> wrote: >>> Hi Tomasz >>> >>> Thanks for your interest. >>> >>> I forward a previous email from Richard when he suggested the test. >>> >>> Mail: >>> >>> In the call we discussed what happens when templates produce relative IRIs. >>> So imagine a table: >>> >>> CREATE TABLE STUDENT (NAME VARCHAR(50)); >>> INSERT INTO STUDENT VALUES ("http://company.com/Alice"); >>> INSERT INTO STUDENT VALUES ("Bob"); >>> INSERT INTO STUDENT VALUES ("Bob/Charles"); >>> INSERT INTO STUDENT VALUES ("path/../Danny)"; >>> INSERT INTO STUDENT VALUES ("Emily Smith"); >>> >>> With a mapping that has: >>> >>> rr:template "{NAME}"; rr:termType rr:IRI; >>> >>> and we run this with a base URI of >>> >>> <http://example.com/base/> >>> >>> For the three different values, this would produce the following IRIs: >>> >>> <http://example.com/base/http%3A%2F%2Fcompany.com%2FAlice> >>> <http://example.com/base/Bob> >>> <http://example.com/base/Bob%2FCharles> >>> <http://example.com/base/path%2F..%2FDanny> >>> <http://example.com/base/Emily%20Smith> >>> >>> Note that first %-encoding is applied, and then base IRI resolution happens >>> if the result of the %-encoding is not a valid IRI (in other words, always). >>> >>> >>> On the other hand, if we had a mapping that uses rr:column instead of >>> rr:template: >>> >>> rr:column "NAME"; rr:termType rr:IRI; >>> >>> then we'd get: >>> >>> <http://company.com/Alice> >>> <http://example.com/base/Bob> >>> <http://example.com/base/Bob/Charles> >>> <http://example.com/base/path/../Danny> >>> (data error) >>> >>> So, no %-encoding is applied to the column value in this case, and the base >>> IRI is *not* prepended if the column already contains a valid IRI. But since >>> we don't do %-encoding, the result can be an invalid IRI, leading to data >>> errors whenever any of these values would have to be returned in a query. >>> >>> Both for rr:template and rr:column, base IRI resolution is simple >>> concatenation with the base IRI. Stuff like "../" doesn't get resolved. >>> >>> Maybe the examples above are useful for creating additional test cases? >>> >> >
Received on Saturday, 25 August 2012 09:27:23 UTC