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

MINUS (test "Subtraction with MINUS from a fully bound minuend")

From: Jan Wielemaker <J.Wielemaker@uva.nl>
Date: Tue, 16 Oct 2012 21:25:20 +0200
Message-ID: <507DB4A0.3080400@uva.nl>
To: public-rdf-dawg-comments@w3.org

Working through the SPARQL 1.1 testcases for ClioPatria, I'm struggling 
with MINUS.
This seems to boil down to what do to with optional bindings (NULL) in 
the minus
arguments.  If I treat them to match everything, I get no results.  If 
treat them
to match only another NULL, I also get ?a = :a2.  Can anyone explain 
what I am

Also related to MINUS: 8.2 talks about two arguments, the left-side and the
right-side.  It isn't very clear on what the left-side argument actually is.
I now consider this to be the query as far as it is collected up to now in
the current GroupGraphPattern.  Is this right?

	Thanks --- Jan

P.s.	Surely I'll be more often confused by the specs or test cases.  Is
	this the right forum or should I use another list?

For your convenience: the test is:

prefix : <http://example/>

select ?a ?b ?c {
   ?a :p1 ?b; :p2 ?c
   MINUS {
     ?d a :Sub
     OPTIONAL { ?d :q1 ?b }
     OPTIONAL { ?d :q2 ?c }
order by ?a

and the data

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix example: <http://example/> .

	example:p1 example:b0 ;
	example:p2 example:c0 .

	example:p1 example:b1 ;
	example:p2 example:c1 .

	example:p1 example:b2 ;
	example:p2 example:c2 .

	example:p1 example:b3 ;
	example:p2 example:c3 .

	a example:Sub .

	a example:Sub ;
	example:q1 example:b1 ;
	example:q2 example:c1 .

	a example:Sub ;
	example:q1 example:b2 .

	a example:Sub ;
	example:q1 example:b3 ;
	example:q2 example:cx .
Received on Tuesday, 16 October 2012 19:25:50 UTC

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