Problem with fragment identifiers in SPARQL query

7 views
Skip to first unread message

Andy

unread,
Jul 31, 2009, 4:29:55 PM7/31/09
to OpenAnzo
I'm not sure whether this is a bug or not in Anzo, but I looked at the
SPARQL specification and nothing stands out to me why I'm receiving
the following behavior from Anzo. I have my basic test TRIG file that
contains two persons. I added a new property called property:item
whose object is a reference to another URI that contains a fragment
identifier. Looks like this:

@base <http://example.org/> .

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

@prefix domain: <http://example.org/> .
@prefix class: <http://example.org/class/> .
@prefix property: <http://example.org/property/> .

domain:person
{
<person/5> rdf:type class:person .
<person/5> property:id "5"^^xsd:unsignedInt .
<person/5> property:name "Carol"^^xsd:string .
<person/5> property:gender "female"^^xsd:string .
<person/5> property:item <person/5#item> .

<person/5#item> rdf:type class:item .
<person/5#item> property:text "no" .

<person/10> rdf:type class:person .
<person/10> property:id "10"^^xsd:unsignedInt .
<person/10> property:name "Thom"^^xsd:string .
<person/10> property:gender "male"^^xsd:string .
<person/10> property:item <person/10#item> .

<person/10#item> rdf:type class:item .
<person/10#item> property:text "no" .
}

Looks like valid RDF and URIs to me. Now I run the following SPARQL
query against it that is suppose to get all triples for <person/
5#item> however, Anzo returns me all the triples for <person/5#item>
and <person/10#item> and appears to ignore the FILTER clause. Anybody
have any ideas on why?

BASE <http://example.org/>

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

PREFIX domain: <http://example.org/>
PREFIX class: <http://example.org/class/>
PREFIX property: <http://example.org/property/>

CONSTRUCT
{
?s ?p ?o .
}
FROM NAMED domain:person
WHERE
{
GRAPH domain:person
{
?s a class:item ;
?p ?o .
FILTER ( ?s = <http://example.org/person/5#item> ) .
}
}

Lee Feigenbaum

unread,
Aug 17, 2009, 1:21:15 PM8/17/09
to open...@googlegroups.com
Hi Andy,

I just tried this one out and can't reproduce it. It may be that the fix
for the BASE error that I just emailed about fixed this as well. If you
continue to have this trouble w/ the latest nightly as of tomorrow,
please let us know.

Lee
--
Lee Feigenbaum
VP Technology & Standards, Cambridge Semantics Inc
l...@cambridgesemantics.com
1-617-553-1060
Reply all
Reply to author
Forward
0 new messages