Intended behavior for invalid IRI in "GRAPH <iri> { } block

Andy,

Section 13.3.2 of the SPARQL spec deals with Restricting by Graph IRI.  There is a question of intended behavior when the specified IRI is neither among the FROM NAMED statements nor supplied by the Http protocol.

One could presume from the example and text of Section 13.3.2 that nothing gets returned, to put it simply.  Another option is that rather than returning an empty set, the handler errors of because of an improperly framed query.  The answer has implications for query optimization.

The issue is more clearly seen in the example (following) from Section 13.3.3, wherein the results of a GRAPH restricted by <IRI> are used as the basis for a subsequent GRAPH restricted by a variable.

PREFIX  data:  <http://example.org/foaf/>
PREFIX  foaf:  <http://xmlns.com/foaf/0.1/>
PREFIX  rdfs:  <http://www.w3.org/2000/01/rdf-schema#>

SELECT ?mbox ?nick ?ppd
FROM NAMED <http://example.org/foaf/aliceFoaf>
FROM NAMED <http://example.org/foaf/bobFoaf>
WHERE
{
  GRAPH data:aliceFoaf_baddie
  {
    ?alice foaf:mbox <mailto:alice@work.example> ;
           foaf:knows ?whom .
    ?whom  foaf:mbox ?mbox ;
           rdfs:seeAlso ?ppd .
    ?ppd  a foaf:PersonalProfileDocument .
  } .
  GRAPH ?ppd
  {
      ?w foaf:mbox ?mbox ;
         foaf:nick ?nick
  }
}

Reframed, the question is this:  When the <IRI> is correctly formed yet not included in a FROM NAMED (or Http protocol), ought the behavior be to error off from an improper query or simply return the empty set?  (Obviously, under some engine implementations it makes no difference.)

Regards,

Thomas Visel


[Description: Description: cid:image001.png@01CAAA70.A85EBAC0]
Thomas A. Visel, Senior Translation Engineer
Office:  512-651-5834
Email: tviselalgebraixdata.com<mailto:rbenci@algebraixdata.com>
www.algebraixdata.com<https://mail.algebraixdata.com/owa/redir.aspx?C=2d0be5b032904ed29d54d21121723791&URL=http%3a%2f%2fwww.algebraixdata.com%2f>

Received on Friday, 15 November 2013 16:28:57 UTC