[redland-dev] [Redland librdf RDF API 0000518]: Blank node parsing error

Mantis Bug Tracker mantis-bug-sender at librdf.org
Sun Jul 29 18:12:02 EDT 2012


The following issue has been SUBMITTED. 
====================================================================== 
http://bugs.librdf.org/mantis/view.php?id=518 
====================================================================== 
Reported By:                Kjetil
Assigned To:                
====================================================================== 
Project:                    Redland librdf RDF API
Issue ID:                   518
Category:                   
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2012-07-29 22:12
Last Modified:              2012-07-29 22:12
====================================================================== 
Summary:                    Blank node parsing error
Description: 
Gregory Todd Williams has the most succinct description of the problem:

 Adding debugging code to RDF::Trine::Parser::Redland->parse, I see this turtle
code being passed to $parser->parse_string_as_stream:

$VAR1 = '@base <http://localhost> .

<http://localhost/foo> <http://xmlns.com/foaf/0.1/page>
<http://en.wikipedia.org/wiki/Foo> ;
<http://www.w3.org/2000/01/rdf-schema#label> "This is a test"@en .
_:void <http://rdfs.org/ns/void#sparqlEndpoint> <http://localhost/sparql> ;
<http://rdfs.org/ns/void#vocabulary>
<http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
<http://localhost/foo/data> <http://rdfs.org/ns/void#inDataset> _:void .
';


That turtle properly has a shared bnode called _:void. This is what is returned
from the redland stream that results from the parsing call:

    <http://localhost/foo/data> <http://rdfs.org/ns/void#inDataset>
_:r1343575460r61658r2
    _:r1343575460r61658r1 <http://rdfs.org/ns/void#vocabulary>
<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
    _:r1343575460r61658r1 <http://rdfs.org/ns/void#sparqlEndpoint>
<http://localhost/sparql>
    <http://localhost/foo> <http://www.w3.org/2000/01/rdf-schema#label> "This is
a test"@en
    <http://localhost/foo> <http://xmlns.com/foaf/0.1/page>
<http://en.wikipedia.org/wiki/Foo>

The single bnode has been parsed as two different bnodes (_:r1343575460r61658r1
and _:r1343575460r61658r2).


Steps to Reproduce: 
It is a bit hard to reproduce as it happens in just a few cases, please let us
know if you cannot reproduce it by the simple example above.

>From the Perl side, it also seems that it happens when the parser object is
reused.

Additional Information: 
This bug was first reported to RDF::Trine on github:
https://github.com/kasei/perlrdf/issues/71
please see that discussion for details.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2012-07-29 22:12 Kjetil         New Issue                                    
======================================================================



More information about the redland-dev mailing list