W3C home > Mailing lists > Public > public-rdf-dawg-comments@w3.org > June 2005

Re: Blank Nodes and SPARQL

From: Dan Connolly <connolly@w3.org>
Date: Thu, 30 Jun 2005 17:38:56 -0500
To: Andy <andy.seaborne@hp.com>, Seaborne@w3.org, Ron Alford <ronwalf@umd.edu>
Cc: public-rdf-dawg-comments@w3.org, Arjohn Kampman <arjohn.kampman@aduna.biz>
Message-Id: <1120171136.5150.361.camel@localhost>

Ron writes...
http://lists.w3.org/Archives/Public/public-rdf-dawg-comments/2005Jun/0045.html
> There is a difference between extending the protocol in a compatible
> way, and extending it in a conflicting manner.

yeah... I'm trying to figure out which you're asking for. I wonder
if a test case clarifies.

I gather the relevant text is...

[[
Blank nodes in queries are distinct from all blank nodes in the data. A
blank node in a graph pattern does not match a blank node in the data by blank
node label. A blank node in a query pattern may match any RDF term.
]]
 -- 2.7 Blank Nodes
 http://www.w3.org/2001/sw/DataAccess/rq23/#BlankNodes

cwm has a mode where it makes up blank nodes based on line/column
numbers so you can see where they came from and so they're repeatable.
So we might have data a la...

 _:l23c14 foaf:mbox <mailto:connolly@w3.org>.

and we might make a query like...

 SELECT ?MBOX
  WHERE { _:l23c14 foaf:mbox ?MBOX. }.

Now in fact, the bnode in the query *does* match the bnode
in the data in that case. So it's pretty clear that

 "A blank node in a graph pattern does not match a blank node in the
 data by blank node label."

is misleading. In fact, I think

 "A blank node in a query pattern may match any RDF term."

should just be

 "A blank node in a query pattern matches every RDF term."

but every is sorta confusing in a way... so maybe

  "In a query pattern, a blank node is parsed as a variable
  that is distinct from all other variables in the query."

so that in the abstract form, query patterns never
have bnodes at all. Andy, how does that strike you?


Meanwhile, if you really mean to use bnodes in
some session context, I'm not sure you can do that
in a compatible way. If you use different bnode
identifiers, they still have to match. i.e.

 SELECT ?MBOX
  WHERE { _:l55c33 foaf:mbox ?MBOX. }.

still has (?MBOX, <mailto:connolly@w3.org>) as a solution,
even thought the bnode identifiers are different.
Any piece of software that says that's not a solution
is not implementing the semantics of SPARQL.

-- 
Dan Connolly, W3C http://www.w3.org/People/Connolly/
D3C2 887B 0F92 6005 C541  0875 0F91 96DE 6E52 C29E
Received on Thursday, 30 June 2005 22:39:01 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:14:48 GMT