W3C home > Mailing lists > Public > public-rdf-dawg-comments@w3.org > January 2011

Uniqueness of blank node labels

From: Kjetil Kjernsmo <kjekje@ifi.uio.no>
Date: Wed, 19 Jan 2011 17:44:12 +0100
To: public-rdf-dawg-comments@w3.org
Message-Id: <201101191744.13047.kjekje@ifi.uio.no>
All,

I'd like to throw out a minor thing, I don't know what's been said about it 
before: http://www.w3.org/TR/sparql11-query/#bgpBNodeLabels
says that:
"When using blank nodes of the form _:abc,  labels for blank nodes are scoped 
to the basic graph pattern.  A label can be used in only a single basic graph 
pattern in any query."

From a query writer's perspective, it is good that blank nodes are scoped to a 
BGP whereas variables are globally scoped. However, it would be nice if the 
blank node label didn't need to be used just a single time in a query, for 
practically the same reasons that lexical scoping is good for programming.

For instance, if two different programmers write code that produce BGPs for 
different parts of a query, and they work independently, currently, if they 
use the same label in different BGPs, there would be breakage. As such, using 
a variable or a blank node for variables you don't need projected are pretty 
much the same thing: If you recycle a variable you get unexpected results, if 
you recycle a blank node label you would get an error, as I understand it.

From a query writer's perspective, it would be nice if they were different -- 
it would be nice if you could just mindlessly use a blank node label again 
and again, you just need to make sure that they are unique in the scope of 
the BGP. I think this would ease writing very complex queries, in particular 
queries where different modules are involved.

Of course, this puts an extra burden on the query engine, so it may not be 
worth it, but I'd like to bring it up.


Cheers,

Kjetil
-- 
Kjetil Kjernsmo
PhD Research Fellow, University of Oslo, Norway
Semantic Web / SPARQL Query Federation
kjekje@ifi.uio.no              http://www.kjetil.kjernsmo.net/
Received on Wednesday, 19 January 2011 22:31:26 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 19 January 2011 22:31:34 GMT