W3C home > Mailing lists > Public > public-rdf-dawg-comments@w3.org > April 2005

More comments about CONSTRUCT

From: Graham Klyne <gk@ninebynine.org>
Date: Fri, 08 Apr 2005 11:21:40 +0100
Message-Id: <>
To: public-rdf-dawg-comments@w3.org

Suppose I have a query that repeatedly binds a variable to a specific bNode 
in the source graph, which is subsequently used to CONSTRUCT a new 
graph.  Should the constructed result force a new bnode for each occurrence 
of the bound variable?


Source data:

   _:a ex:p1 ex:o1 .
   _:a ex:p1 ex:o2 .

   CONSTRUCT ( ?s ex:p1 ?o )
   WHERE     { ( ?s ex:p1 ?o ) }

Result (a):
   _:a ex:p1 ex:o1 .
   _:a ex:p1 ex:o2 .
or (b):
   _:a1 ex:p1 ex:o1 .
   _:a2 ex:p1 ex:o2 .

In this case, I think that result (a) should be returned, especially if the 
query result is to be used as the basis for some inference process (but 
that can introduce some complications [1]).

I note that in the latter case, available information is lost.  The text in 
section 10.2 of [2] seems to indicate that the latter case is intended.

Also, there's the matter of comparability with CONSTRUCT *.


[1] I encountered something like this when implementing simple rules for my 
Swish software, and came to the conclusion that to maintain consistency (in 
the intuitive rather than logical sense) I needed a way to track the scope 
of a bnode.

[2] http://www.w3.org/TR/2005/WD-rdf-sparql-query-20050217/

Graham Klyne
For email:
Received on Friday, 8 April 2005 10:36:04 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:52:06 UTC