W3C home > Mailing lists > Public > public-rdf-dawg-comments@w3.org > October 2010

Explanation of OPTIONAL vs { OPTIONAL }

From: Graham Klyne <graham.klyne@zoo.ox.ac.uk>
Date: Fri, 01 Oct 2010 09:56:42 +0100
Message-ID: <4CA5A24A.1000102@zoo.ox.ac.uk>
To: public-rdf-dawg-comments@w3.org
With reference to
http://www.w3.org/TR/2010/WD-sparql11-query-20100601/#optionals
http://www.w3.org/2009/sparql/docs/query-1.1/rq25.xml#optionals

I think it would be helpful to add some explanation that
    P OPTIONAL Q
and
    P { OPTIONAL Q }

can yield different results.  I recognize that to some extent this request 
challenges the philosophy of what a specification is _for_, and accept that the 
first purpose of a specification is to specify, but I also think that some level 
of explanation helps to ensure the specification is properly followed.  In this 
case, both myself and at least one other experienced developer had not expected 
there to be a difference.

For my own benefit, I've created an explanation based on elements of the query 
algebra which you are welcome to copy and/or adapt if that is helpful:
http://code.google.com/p/milarq/wiki/OutstandingIssues#OPTIONAL_in_braces_doesn't_work_as_might_be_expected

#g
Received on Friday, 1 October 2010 08:57:41 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 1 October 2010 08:57:41 GMT