Re: Column-valued and IRI term-type

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 Friday, 17 August 2012 11:21:19 UTC