Re: allow implicitly unbound variables in SPARQL results?

Steve Harris wrote:
> On Mon, Oct 03, 2005 at 05:18:52 -0500, Dan Connolly wrote:
> 
>>Reviewing last call comment status, this one is (a) not connected
>>to an open issue, (b) not just editorial, and (c) hasn't
>>gotten much airtime.
>>
>>This request seems pretty reasonable:
>>
>>[[
>>There are at least two ways to trim the results back down with just
>>syntax changes.  The least intrusive change would be to just drop the
>><unbound> tag, and have it be implicit with <binding name=".."/>.  More
>>drastic is to just drop the entire <binding> tag when the variable is
>>unbound, since the information can be retrieved from the head.
>>]]
>> -- SPARQL Results Format and Unbound Variables
>>http://www.w3.org/mid/42F4CEEB.5090306@umd.edu aka
>>http://lists.w3.org/Archives/Public/public-rdf-dawg-comments/2005Aug/0043
>>
>>
>>So how about we make <binding> elements for unbound variables
>>optional?
> 
> 
> Optional meaning may or may not be there I'm oposed to, but optional
> (w.r.t. the schema) meaning they must not be there if the variable is
> unbound would get my vote, though I believe it makes writing XSLT sheets
> harder.
> 
> - Steve
> 

Having it there sometimes is the most invconvenient.

As to whether to put it in always or never, I'm neutral.

- - - - - - - -

If the UNION has disjoint variable sets, then using OPTIONALs works and does 
not require a new operator in the algebra.

e.g.

http://www.mindswap.org/2005/sparql/unbound/person.query

PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT *
WHERE {
  ?person a foaf:Person.
  { ?person foaf:name ?name } UNION
  { ?person foaf:mbox ?mbox } UNION
  { ?person foaf:homepage ?homepage } UNION
  { ?person foaf:mbox_sha1sum ?mbox_sha1sum } UNION
  { ?person foaf:nick ?nick } UNION
  { ?person rdfs:seeAlso ?seeAlso }
}

is more compactly done with OPTIONALs.


Multi-arity predicates seem to be OPTIONALS with more than one triple pattern 
if I understand proposed usage correctly.

	Andy

Received on Tuesday, 4 October 2005 11:34:25 UTC