Warning:
This wiki has been archived and is now read-only.

Feature:BlankNodeRefs

From SPARQL Working Group
Jump to: navigation, search


Feature: Query References to Blank Nodes in the Data

The ability to refer to a blank node discovered in one query as a constraint for another query.

See: bnodeRef

Feature description

Query can be used to navigate a structure as well as answer semantic questions. When used to naviate a structure, there is a need to be able to use RDF terms in query results to issue new queries. This includes blank nodes.

This feature is not providing access to blank nodes labels used in some RDF serialization where different scoping rules apply.

Typically, implementations provide support for this in one of two ways:

Either they assume a (parameterized) interpretation of basic graph matching where blank node ids of the form:

 _:blankNode

are understood (by the server) to correspond to the names of blank nodes in the active graph. Backwards compatibility can be ensured by having this feature remain deactivated by default (unless explicitly specified in the query)

Or they extend the SPARQL syntax (in a backward compatible way) to allow an explicit way to address blank nodes in the active graph via direct identification.

Example

 PREFIX : <http://example.org/> 
 SELECT *
 USING BNODEREF
 WHERE
 {
   _:a ?p ?v . OPTIONAL { ?v ?p2 [] }
 }
 PREFIX : <http://example.org/> 
 SELECT *
 WHERE
 {
   <_:1234-5678-90> a Foo # A blank node in the data
   _:b0 ?prop ?val  # A blank node in the query - a variable
 }

Existing Implementation(s)

One such extension is the pseudo URI scheme "_" as in <_:abcd>.

Known implementations:

ARC

Garlik

RDFLib

ARQ matching blank node labels

Existing Specification / Documentation

ARQ matching blank node labels

Compatibility

Links to postponed Issues

BNode reference

Related Features

Feature:AccessingRdfLists

Champions

Chimezie Ogbuji Cleveland Clinic Foundation

Use cases

References