Questions on the latest SPARQL draft...

Dear all,

I am rather new to SPARQL and please forgive me, if I haven't yet an 
overview over all the historical discussions leading to the current 
draft. Still, I'd appreciate if some members of the WG could shed light 
on me with respect to the following questions, referring to

http://www.w3.org/TR/2005/WD-rdf-sparql-query-20051123/


1) Why are blank nodes allowed in query patterns in
sparql? As far as I can see, they boil down to non-distinguished 
variables, i.e. variables not used in the select statement, so what's 
the use of having them? I see that it is useful in the [ ] notation, but 
qually this notation could be defined via introducing new variables 
instead of blank nodes, right? So, no need for blank nodes again.
   Just to ensure my conjecture: Blank nodes in query patterns can 
generally be replaced by new (unused) non-distinguished variables, yes?

  If this is the case, probably just a matter of taste, I'd prefer not 
to have both options in SPARQL, but to stick with either:
  a) allow variables (distinguished and non-distinguished) only in query 
patterns, but no blank nodes
  b) allow only distinguished variables and blank nodes, but no 
non/distinguished variables in query patterns.

2) There are no variables allowed in datatype positions, correct?
Don't know exactly whether it actually would make much sense, but on the
other hand, I don't see a good reason why to forbid it, e.g.

WHERE
{
[ :p ?l^^?t ].
}

Sven pointed out in personal discussion that this could be (almost) 
equally written as:

WHERE
{
[ :p ?l ].
FILTER(datatype(?l)=?t)
}

but actually, I see no reason why to not allow the former notation and 
also it is not completely equal in my opinion, since the former allows 
me to "split off" the literal value from a typed literal, whereas the 
latter doesn't.


3) In the description of the "[ ]" notation in section 2.8.3
the draft says the following:

"A blank node that is used in only one place in the query syntax can be
abbreviated with []. A unique blank node will be created and used to 
form the triple pattern.

The [:p :v] construct can be used in triple patterns. It creates a blank
node label which is used as the subject of all contained 
predicate-object pairs.  The created blank node can also be used in 
further triple patterns in the subject and object positions."

Do I understand correctly that this means that [] CAN be used in 
predicate position, but [:p :v] CAN'T?

I honestly fail to see the reason for this distinction. Actually, I 
could imagine a use for the latter in the predicate postition, for 
instance in the following:

SELECT ?v
WHERE
{
    [] [ a owl:transistiveProperty] ?v.
}

i mean here: I'd want to query the values of transitive properties (or 
in general, the values of properties of a certain kind)... should be 
allowed IMO. If not, what is the particular reason for disallowing it?

Thanks a lot in advance for clarification,
axel

-- 
Dr. Axel Polleres
email: axel@polleres.net  url: http://www.polleres.net/

Received on Friday, 3 February 2006 11:54:34 UTC