Marvin Frommhold created JENA-1001:
--------------------------------------

             Summary: named graphs set not empty if no FROM NAMED clause given
                 Key: JENA-1001
                 URL: https://issues.apache.org/jira/browse/JENA-1001
             Project: Apache Jena
          Issue Type: Bug
          Components: Fuseki
    Affects Versions: Fuseki 2.0.0
            Reporter: Marvin Frommhold


According to the [SPARQL 1.1 Query Language 
specification|http://www.w3.org/TR/2013/REC-sparql11-query-20130321/] the set 
of named graphs must be empty if a query only specifies FROM clauses and no 
FROM NAMED clauses:

bq. An RDF Dataset comprises ... zero or more named graphs

That means, the only way to express zero named graphs is to specify no FROM 
NAMED clause.

*But:*

Having the following data:
http://example.org/graph1
{code}
<urn:subject1> rdfs:label "Subject one" .
{code}
http://example.org/graph2
{code}
<urn:subject2> rdfs:label "Subject two" .
{code}
and executing the query:
{code}
SELECT ?g
FROM <http://example.org/graph1>
WHERE {
  GRAPH ?g { ?s ?p ?o . }
}
{code}
will return
{code}
 ?g
===========
 ex:graph1
 ex:graph2
{code}
which proves that the set of named graphs is not empty:

{quote}
GRAPH can ... use a variable which will range over the IRI of all the named 
graphs in the query's RDF dataset.
{quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to