W3C home > Mailing lists > Public > public-rdb2rdf-comments@w3.org > August 2012

Re: Column-valued and IRI term-type

From: Tomasz Pluskiewicz <tomasz.pluskiewicz@gmail.com>
Date: Fri, 17 Aug 2012 08:57:31 +0200
Message-ID: <CAAFOhSeXoS1n5tA3YiOAqZXB0RzY4b2JQgL0__vD0zEz_mmmug@mail.gmail.com>
To: Boris Villazon-Terrazas <bvillazon@fi.upm.es>
Cc: public-rdb2rdf-comments@w3.org
Thanks for your reply Boris

Sure I get it. 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?

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 06:58:51 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 17 August 2012 06:58:51 GMT