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

CONSTRUCT *, optionals and alternatives

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

I can't reliably figure this:

Does a query submitted with "CONSTRUCT *" always return a graph equivalent 
to a query submitted with "CONSTRUCT p", where p is the query pattern 

If not, why not (e.g. please show counter-example)?

(If true, this greatly simplifies my implementation.)


Partly answering my own question, I think this holds for simple query 
patterns, but doesn't obviously extend to more complex patterns involving 
optional or alternative elements.  I'm trying to figure out a way to 
construct the result graph from just the variable binding results.  Hmmm... 
maybe I can introduce some additional hidden variable bindings to track the 
optional/alternative choices matched


Looking more closely at OPTIONAL and UNION, I notice that the following may 
give rise to different results:
    a UNION {}

I mention this because in past work, I have implemented optional matching 
as a special case of alternative matching, where my alternative was a 
match-first-alternative rather than match-any-alternatives.

(I'm not asking for any change here, just making an observation.)


Graham Klyne
For email:
Received on Friday, 8 April 2005 09:42:13 UTC

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