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: <5.1.0.14.2.20050408110639.00bb8348@127.0.0.1>
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?

Example.

Source data:

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

Query:
   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 *.

#g
--

[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:
http://www.ninebynine.org/#Contact
Received on Friday, 8 April 2005 10:36:04 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:14:48 GMT