W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > January to March 2010

Re: Syntax of MINUS

From: Alexandre Passant <alexandre.passant@deri.org>
Date: Wed, 31 Mar 2010 11:55:59 +0100
Cc: SPARQL Working Group <public-rdf-dawg@w3.org>
Message-Id: <66EC0B44-18C6-43BD-87F2-D8C6DCFD0B54@deri.org>
To: Andy Seaborne <andy.seaborne@talis.com>

On 31 Mar 2010, at 11:35, Andy Seaborne wrote:

> 
> 
> On 31/03/2010 11:11 AM, Alexandre Passant wrote:
>> 
>> On 31 Mar 2010, at 09:13, Andy Seaborne wrote:
>> 
>>> Should the syntax of MINUS be like UNION with {} on the left-hand side
>>> 
>>> { { ?s a foaf:Person
>>>    ?s foaf:name ?name
>>>  }
>>>  MINUS
>>>  { ?s foaf:knows ?other }
>>> }
>>> 
>>> or without:
>>> 
>>> { ?s a foaf:Person .
>>>  ?s foaf:name ?name .
>>>  MINUS { ?s foaf:name ?name }
>>> }
>> 
>> My preference for the second one, saves a few editing process when adding / removing a MINUS clause from an existing query.
> 
> For the record, we could change UNION to allow {}-less LHS
> 
> A chain of UNIONs would be
> 
>  pattern UNION { pattern } UNION { pattern }

Would be nice indeed.

Alex.

> 
> This has no effect on SPARQL 1.0 style queries.
> 
>  { pattern } UNION { pattern } UNION { pattern }
> 
> is still legal and the same semantics.  It's just a tweak to the grammar - the same AST and same algebra would result.
> 
> (Ditto any future INTERSECTION which would presumably be the same as doing a join and projecting to common variables in SPARQL).
> 
> 	Andy
> 

--
Dr. Alexandre Passant
Digital Enterprise Research Institute
National University of Ireland, Galway
:me owl:sameAs <http://apassant.net/alex> .
Received on Wednesday, 31 March 2010 11:00:16 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:15:42 GMT