The following issue has been SUBMITTED.
======================================================================
http://bugs.librdf.org/mantis/view.php?id=358
======================================================================
Reported By: lmazuel
Assigned To:
======================================================================
Project: Rasqal RDF Query Library
Issue ID: 358
Category: query engine
Reproducibility: always
Severity: major
Priority: normal
Status: new
Query Language: SPARQL
======================================================================
Date Submitted: 2010-03-11 09:26
Last Modified: 2010-03-11 09:26
======================================================================
Summary: Cannot integrate CONSTRUCT SPARQL queries when they
contains blank nodes
Description:
For instance, if we consider this set of triples:
_:a <http://test/link> "Literal1" ;
a <http://test/Class1> .
_:b <http://test/link> "Literal2" ;
a <http://test/Class2> .
parsed in redland in triplestore:
[[
{(r1268294762r30192r1), [http://test/link], "Literal1"}
{(r1268294762r30192r1),
[http://www.w3.org/1999/02/22-rdf-syntax-ns#type], [http://test/Class1]}
{(r1268294762r30192r2), [http://test/link], "Literal2"}
{(r1268294762r30192r2),
[http://www.w3.org/1999/02/22-rdf-syntax-ns#type], [http://test/Class2]}
]]
Then, the SPARQL request:
CONSTRUCT { ?d <http://test/work> true .} WHERE { ?d a
<http://test/Class2> .}
gives the statement:
{(r1_r1268294907r30210r2), [http://test/work],
"true^^<http://www.w3.org/2001/XMLSchema#boolean>"}
The problem is that the resulting statement does not use the same blank
identifier that the triplestore. Then, adding this statement to the
triplestore gives:
[[
{(r1268294907r30210r1), [http://test/link], "Literal1"}
{(r1268294907r30210r1),
[http://www.w3.org/1999/02/22-rdf-syntax-ns#type], [http://test/Class1]}
{(r1268294907r30210r2), [http://test/link], "Literal2"}
{(r1268294907r30210r2),
[http://www.w3.org/1999/02/22-rdf-syntax-ns#type], [http://test/Class2]}
{(r1_r1268294907r30210r2), [http://test/work],
"true^^<http://www.w3.org/2001/XMLSchema#boolean>"}
]]
which is not correct.
I have made many tests, and it seems that in all cases it's just a prefix
"r1_" which is added in the beginning of the blank identifier. If we
remove it, we have the real identifier which can be used to produce the
result we want. However it is not a very efficient method.... Is there a
way I missed to make this easier? Can it be considered as a bug otherwise?
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2010-03-11 09:26 lmazuel New Issue
2010-03-11 09:26 lmazuel Query Language => SPARQL
======================================================================
_______________________________________________
redland-dev mailing list
[email protected]
http://lists.librdf.org/mailman/listinfo/redland-dev