Skip to content
This repository was archived by the owner on Sep 28, 2022. It is now read-only.
This repository was archived by the owner on Sep 28, 2022. It is now read-only.

ExecuteSPARQLStar query result issue #24

Open
@Lars-H

Description

@Lars-H

Hi,

I am trying to re-create the examples given in the paper [1].
I have extended the RDF* File a bit to:

@prefix : <http://example.org/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix dct: <http://purl.org/dc/terms/> .

:Bob foaf:name "Bob" .
<<:Bob foaf:age 23>> dct:creator <http://example.com/crawler#c1> ;
                    dct:source <http://example.net/listings.html> .
<<:Bob foaf:knows :Alice>> dct:creator <http://example.com/crawler#c1> ;
                    dct:source <http://example.net/listings.html> .

Now, I am executing the SPARQL* query also provided in the paper:

PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX dct: <http://purl.org/dc/terms/>
SELECT ?x ?age ?src
WHERE {
   <<?x foaf:age ?age>> dct:source ?src  .
}

When I execute the presented query over the given RDF* graph using the ExecuteSPARQLStar CLI, I obtain the following results:

{
  "head": {
    "vars": [ "x" , "age" , "src" ]
  } ,
  "results": {
    "bindings": [
      {
        "x": { "type": "uri" , "value": "http://example.org/Bob" } ,
        "age": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "23" } ,
        "src": { "type": "uri" , "value": "http://example.net/listings.html" }
      } ,
      {
        "x": { "type": "uri" , "value": "http://example.org/Bob" } ,
        "age": { "type": "uri" , "value": "http://example.org/Alice" } ,
        "src": { "type": "uri" , "value": "http://example.net/listings.html" }
      }
    ]
  }
}

However, I would expect the results not to include the second solution mapping, since the nested triple <<:Bob foaf:knows :Alice>> does not match the nested triple pattern <<?x foaf:age ?age>> .
It appears as if the query engine merely matches the "outer" triple pattern and does not consider the nested triple. Is this behavior correct according to the semantics of SPARQL*?

Thanks and best regards,
Lars

[1] http://olafhartig.de/files/Hartig_AMW2017_RDFStar.pdf

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions