[redland-dev] [Raptor RDF Syntax Library 0000596]: No serialized output for Turtle and abbreviated RDF/XML when data contains any blank-node cycles

Mantis Bug Tracker mantis-bug-sender at librdf.org
Mon Mar 16 08:13:44 EDT 2015


The following issue has been SUBMITTED. 
====================================================================== 
http://bugs.librdf.org/mantis/view.php?id=596 
====================================================================== 
Reported By:                arto
Assigned To:                
====================================================================== 
Project:                    Raptor RDF Syntax Library
Issue ID:                   596
Category:                   api
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
Syntax Name:                turtle 
====================================================================== 
Date Submitted:             2015-03-16 13:13
Last Modified:              2015-03-16 13:13
====================================================================== 
Summary:                    No serialized output for Turtle and abbreviated
RDF/XML when data contains any blank-node cycles
Description: 
When feeding the "turtle" or "rdfxml-abbrev" serializers some data that also
happens to contain triples in the following pattern, no output whatsoever is
produced:

  _:g1 foaf:primaryTopic _:g2 .
  _:g2 foaf:isPrimaryTopicOf _:g1 .

It is not just that the two triples in question are omitted, but indeed no
output triples whatsoever are produced, only the base and prefix declarations
(for Turtle) or the containing RDF/XML element (for abbreviated RDF/XML).

This affects both use through the API as well as is reproducible using the
`rapper` utility, as described below.


Steps to Reproduce: 
$ cat circular.nt
_:g1 <http://xmlns.com/foaf/0.1/primaryTopic> _:g2 .
_:g2 <http://xmlns.com/foaf/0.1/isPrimaryTopicOf> _:g1 .

$ rapper -q -i ntriples -o turtle circular.nt
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

$ rapper -q -i ntriples -o rdfxml-abbrev circular.nt
<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"/>

$ rapper -q -i ntriples -o rdfxml circular.nt
<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
  <rdf:Description rdf:nodeID="g1">
    <ns0:primaryTopic xmlns:ns0="http://xmlns.com/foaf/0.1/" rdf:nodeID="g2"/>
  </rdf:Description>
  <rdf:Description rdf:nodeID="g2">
    <ns0:isPrimaryTopicOf xmlns:ns0="http://xmlns.com/foaf/0.1/"
rdf:nodeID="g1"/>
  </rdf:Description>
</rdf:RDF>

$ rapper -q -i ntriples -o ntriples circular.nt
_:g1 <http://xmlns.com/foaf/0.1/primaryTopic> _:g2 .
_:g2 <http://xmlns.com/foaf/0.1/isPrimaryTopicOf> _:g1 .


Additional Information: 
This would seem to be a regression, as I'm pretty sure this used to work once
upon a time. Data files containing such cycles are not all that rare.

====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2015-03-16 13:13 arto           New Issue                                    
======================================================================



More information about the redland-dev mailing list