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
MIME-Version: 1.0
X-Mailer: MIME-tools 5.504 (Entity 5.504)
X-RT-Interface: Web
Message-ID: <rt-4.0.16-30908-1379602647-1643.0-0-0 [...] rt.cpan.org>
X-RT-Original-Encoding: utf-8
Content-Type: multipart/mixed; boundary="----------=_1379602647-30908-2"
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 0
Content-Disposition: inline
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: binary
Content-Length: 745
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
MIME-Version: 1.0
Content-Type: application/octet-stream; name="R2RML-language.pl"
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline; filename="R2RML-language.pl"
Content-Transfer-Encoding: base64
Content-Length: 978
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);
MIME-Version: 1.0
In-Reply-To: <rt-4.0.16-30908-1379602647-1643.0-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <rt-4.0.16-30908-1379602647-1643.0-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.16-20408-1379687238-412.88816-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 23
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.