W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > January to March 2010

Re: [TF-LIB] BNode (was: Finalizing built-ins)

From: Andy Seaborne <andy.seaborne@talis.com>
Date: Tue, 23 Feb 2010 14:26:40 +0000
Message-ID: <4B83E5A0.20307@talis.com>
To: Lee Feigenbaum <lee@thefigtrees.net>
CC: SPARQL Working Group <public-rdf-dawg@w3.org>


On 23/02/2010 2:09 PM, Lee Feigenbaum wrote:
> Hi Andy,
>
> Thanks - my thoughts are below.
>
> On 2/23/2010 8:14 AM, Andy Seaborne wrote:
>> In an effort to progress the syntax issues ...
>>
>> http://www.w3.org/2009/sparq/wiki/Design:FunctionLibrary#SPARQL_specific
>>
>> We have some built-in functions proposed:
>>
>> ** BNODE() -> fresh blank node every call.
>>
>> ** BNODE(string) -> same blan k node as other use of BNODE(string)
>>
>> Scope is per binding (row) so
>> BNODE("a") is like _:a in CONSTRUCT templates.
>>
>> Do we also way bnodes scoped to the whole result set?
>> Replace the meaning of BNODE("label") or have another form?
>
> I don't have a strong feeling for this as I tend to shun bnodes anyway
> :) - but I do have a question: if BNODE("a") had result-set scope, is
>
> SELECT (_:a = BNODE("a") AS ?match) ... true or false (or illegal)?

It's actually illegal currently (phew!) because you can't have a 
constant bnode in an expression.

The general case of:

?x = _:a  or <_:a>
SELECT (?x = BNODE("a") AS ?match)

I suggest should be false.

BNODE("a") does not create a bnode with that string - it creates a new 
bnode distinct from all other bnodes except those created by BNODE("a").

So the bnode from the data can't the same as the bnode from BNODE (any 
form).

Steve wrote:
 >
 > Ah, maybe, I think I'd thought that's what this function did. Result-set
 > scoped bNodes are not something you can mint currently.
 >
 > Related: do we have any consensus around a skolemisation function?
 > SKOLEMISE(?bnode) -> URI.
 > I'm not sure how many people want / could support such a thing.

As an "illegal" URI like <_:label>?

I support that.

Alternative is to register a URI scheme.  Or purloin some urn: scheme 
like urn:x-bnode:label.

 >
 >> Replace the meaning of BNODE("label") or have another form?
 >
 > We maybe need both forms. Axel has some usecase IIRC?

Yes - I think we do indeed need both.  No idea how just at the moment 
how to express in syntax.

BNODE("label", boolean) with "true" for result set (and BNODE/1 being 
default true).

BNODE("A", false) and BNODE("A", true) are different bNodes.

----

Because you can't pass a bnode from one row to another, I don't think 
you can construct lists over result rows under any proposal so far.  Is 
this an issue?

	Andy
Received on Tuesday, 23 February 2010 14:27:11 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:15:41 GMT