Skip Menu |
 

This queue is for tickets about the RDF-RDB2RDF CPAN distribution.

Report information
The Basics
Id: 88816
Status: resolved
Priority: 0/
Queue: RDF-RDB2RDF

People
Owner: Nobody in particular
Requestors: vladimir.alexiev [...] ontotext.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.007
Fixed in: (no value)



Subject: don't URL-encode rr:column
Download (untitled) / with headers
text/plain 745b
http://www.w3.org/TR/r2rml/#from-template says: "R2RML always performs percent-encoding when IRIs are generated from string templates. If IRIs need to be generated without percent-encoding, then rr:column should be used instead of rr:template". However, rr:column us turned into rr:template (by surrounding it with {..}), so this distinction is lost. - This is done 4 times in R2RML.pm, search for {%s}. One of them sets _about_is_column, but only for Subjects. - in Simple.pm, template() and template_irisafe() should be called only for rr:template but not for rr:column. I attach a test. It should output http://purl.org/dc/elements/1.1/title or dc:title but not http://example.com/base/http%3A%2F%2Fpurl.org%2Fdc%2Felements%2F1.1%2Ftitle
Subject: R2RML-language.pl
Download R2RML-language.pl
text/x-perl 978b
#!/usr/bin/perl use 5.010; use lib "../lib"; use RDF::Trine qw[iri statement literal variable]; use RDF::RDB2RDF::R2RML; my $dbh = DBI->connect("dbi:SQLite:dbname=../t/library.sqlite"); my $mapper = RDF::RDB2RDF->new('R2RML', <<'R2RML'); @base <http://id.example.net/>. @prefix rr: <http://www.w3.org/ns/r2rml#>. @prefix rrx: <http://purl.org/r2rml-ext/>. @prefix bibo: <http://purl.org/ontology/bibo/>. @prefix dc: <http://purl.org/dc/elements/1.1/>. [] rr:logicalTable [rr:sqlQuery """ select *, 'http://purl.org/dc/elements/1.1/title' as titleProperty from books"""]; rr:subjectMap [rr:class bibo:Book; rr:template "book/{book_id}"]; rr:predicateObjectMap [ rr:predicateMap [rr:column "titleProperty"]; rr:objectMap [ rr:column "title"; rrx:languageColumn "title_lang"; rr:language "en" # default ]]. R2RML print $mapper->process_turtle($dbh) #, no_json=>1, no_r2rml=>1);
This is fixed in 0.008.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.