W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > April to June 2006

Re: Blank node identifiers in FILTER clauses

From: Jeen Broekstra <jeen.broekstra@aduna-software.com>
Date: Thu, 29 Jun 2006 11:54:24 +0200
Message-ID: <44A3A350.4010805@aduna-software.com>
To: Bijan Parsia <bparsia@cs.man.ac.uk>
CC: Kendall Clark <kendall@monkeyfist.com>, RDF Data Access Working Group <public-rdf-dawg@w3.org>

Bijan Parsia wrote:
> On Jun 28, 2006, at 1:32 PM, Kendall Clark wrote:
>> On Jun 28, 2006, at 5:15 AM, Jeen Broekstra wrote:
>>> I can live with either of these and have a slight preference for the
>>> second. To be honest I could live without the blank nodes in queries
>>> altogether. They are confusing and annoying (this discussion is a case
>>> in point), and I find the supposed 'cut&paste' benefit unconvincing. But
>>> that station is passed I guess.
>> I couldn't agree more. I wasn't convinced by it as a reason, offered 
>> by TimBL, for turtleizing our syntax, and I'm even less
>> convinced by it now. It's the biggest single wart on SPARQL and I wish 
>> we could chop it off w/out mercy.
>> But I'm also not convinced that it's too late. If the WG decides to do 
>> it, and will put in the work to make it happen,
>> then it's "merely" a matter of doing the work.
> I would like to separate the syntax issue from the capability issue. At 
> the moment, as I understand it, BNodes in the query represent 
> *undistinguished* variables, that is, variables that do not need a 
> binding to a constant and *cannot* report their bindings (thus don't 
> need to establish one).

I'm not sure I understand this (though I *think* I agree with it ;)). I 
have always understood that it currently works like this: blank node 
identifiers in graph patterns act exactly the same as variable names (in 
that the same bnode id in the same graph pattern is unified), only the 
scoping is different and we can not report the binding in the 
projection. It does need to establish a binding though, otherwise the 
graph pattern match fails.

Using "unidentified" blank nodes (the square brackets syntax) however is 
more akin to what you say: each blank node in the graph pattern is 
unique and unaddressable, we can't unify it with a blank node anywhere 
else in the graph, we just express that there should be _some_ value 
(but don't care what that value is).

Perhaps I'm missing a bit of background here: can you clarify what you 
mean with a 'distinguished' vs. a 'undistinguished' variable, exactly?

> This is an important capability (distinct from 
> projection) which currently there is no other way to (exactly) express 
> in SPARQL.

Yes, being able to use square bracket syntax as 'anonymous' variables is 
useful I think:

SELECT ?x ?y
  { ?x foaf:name [] ;
       foaf:knows ?y .


SELECT ?person ?friendname
WHERE { ?person foaf:knows [
			    foaf:name ?friendname
			   ] .

But the blank node identifiers (_:a) used as variable names (...but with 
different scoping) is just a pain IMHO. If you care about unifying the 
binding somewhere else in the pattern (or getting the result in the 
projection), give it a variable name. If you don't, use an anonymous 
variable (square brackets).


Jeen Broekstra <jeen.broekstra@aduna-software.com>
Senior Software Developer
Aduna (http://www.aduna-software.com/)
Prinses Julianaplein 14-b, 3817 CS Amersfoort, The Netherlands
tel. +31-(0)33-4659987
Received on Thursday, 29 June 2006 09:55:05 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:00:51 UTC