W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > October to December 2009

Re: Comment on: rq25

From: Andy Seaborne <andy.seaborne@talis.com>
Date: Tue, 22 Dec 2009 12:25:20 +0000
Message-ID: <4B30BAB0.6030604@talis.com>
To: Olivier Corby <Olivier.Corby@sophia.inria.fr>
CC: SPARQL Working Group <public-rdf-dawg@w3.org>


On 21/12/2009 15:51, Olivier Corby wrote:
>> 8 Negation - Testing for the absence of a pattern
>>
>> I am not really happy that the EXISTS and NOT EXISTS pattern can be used
>> in a filter.
>>
>> Could you say why that is?
>
> It is a feeling about language design.
> Graph pattern is about graph match and filter is about evaluable
> expressions. Here we mix both and that looks strange to me...
>
>
>> Yes it can be combined with any other expressions. The effect of &&
>> can be achieved anyway but not ||.
>>
>> FILTER( EXISTS {?x :tax :exempt} || ?taxCode = :special )
> What about:
>
> {EXISTS {?x :tax :exempt}} union { NOT EXISTS {?x :tax :exempt}
> filter(?taxCode = :special) }

In full, we have

{
   pattern
   FILTER( EXISTS {?x :tax :exempt} || ?taxCode = :special )
}

then
{ pattern
   EXISTS {?x :tax :exempt}}
union
{ pattern
   NOT EXISTS {?x :tax :exempt}
}

and pattern has be duplicated doesn't it?.  "pattern" may be quite 
large.  The FILTER form means the pattern occurs once.

>
>
>> The new variable is introduced using the keyword AS; it must not already
>> be potentially bound.
>> Do you have an suggestions for text changes?
> May be we can list the places where the 'variable' cannot be used ?
>

Sure - it'll be tricky langauge because of nested SELECTs.

A start is in: rq25.xml#ast_select_expressions

	Andy

> Olivier
>
>
>
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email
> ______________________________________________________________________
Received on Tuesday, 22 December 2009 12:25:43 GMT

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