- From: Boris Villazon-Terrazas <bvillazon@fi.upm.es>
- Date: Tue, 6 Mar 2012 00:29:59 +0100
- To: Richard Cyganiak <richard@cyganiak.de>
- Cc: Public-Rdb2rdf-Wg RDB2RDF <public-rdb2rdf-wg@w3.org>
- Message-Id: <0E6D9E3F-DED5-4F11-B741-475E06269E13@fi.upm.es>
Hi Richard
Thanks for your suggestions/comments, please read my comments inline
On Mar 1, 2012, at 3:48 PM, Richard Cyganiak wrote:
> Boris,
>
> Database D016-1table1primarykey10columns3rowsSQLdatatypes contains a column declared as BINARY(20).
>
> BINARY(20) is a fixed-length binary type, so shorter values get padded (with zero-value bytes IIRC) upon insertion.
>
> The DM test case that exercises this database contains xsd:hex64binary encoded versions of the original, non-padded data.
>
> This is incorrect, it should contain the padded version.
>
> Perhaps more reasonably, the column declaration should be changed to VARBINARY(20).
I updated the sql script.
>
> This is similar to the issue we had earlier with CHAR/VARCHAR.
>
> Note: It seems there's no test case for R2RML that uses a binary type. Please add one. The easiest thing is to just use a binary column in a column-valued object map with rr:column and without a rr:datatype declaration. When rr:datatype is *not* specified, then R2RML always uses the natural datatype mapping, hence the result will be the same hex64binary typed literal as in the DM.
>
> Note: Juan requested weird corner cases, so here's one that's actually kind of cool. Let's use a VARBINARY column in a URI template to create data URIs [1]:
>
> rr:template "data:image/png;base64,{\"Photo\"}";
>
> This should produce something like this:
>
> data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==
>
> If everything works, you can actually open that URI in your browser (it produces a small round red dot).
If I understood you correctly, we should have sth like [1], so for the predicateObjectMap we would have
rr:predicateObjectMap
[
rr:predicate ex:photo;
rr:objectMap [ rr:template "data:image/png;base64,{\"Photo\"}"; ];
];
.
so, the resultant object would be an IRI ?
<data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==>
If this is the case, I'm not sure if we can parse that as URI
Best
Boris
[1] http://www.w3.org/2001/sw/rdb2rdf/test-cases/#R2RMLTC0016e
>
> Best,
> Richard
>
> [1] http://en.wikipedia.org/wiki/Data_URI_scheme
Received on Monday, 5 March 2012 23:30:24 UTC