Re: Question about literals in subject position

On 22 Sep 2009, at 12:39, Birte Glimm wrote:

> <snip>
>
>> Section 12.6 of the current spec says here (there are people in the  
>> group
>> who can probably shed more light on the meaning, in case I got it  
>> wrong):
>>
>> "For any basic graph pattern BGP and pattern solution mapping P,  
>> P(BGP) is
>> well-formed for E."
>
> So well-formed means it is a valid statement (makes sense) and even
> though the entailment holds, it is an illegal query since stating such
> a thing is forbidden. Then, however, I would say that even under
> simple entailment the systems should classify such a query as illegal
> or return no answers because the results for the query are not
> well-formed. They are simply invalid RDF. I just noticed also that
> SPARQL 1.0 says under 12.1.4 Triple Patterns:
> Because RDF graphs may not contain literal subjects, any SPARQL triple
> pattern with a literal as subject will fail to match on any RDF graph.
> This would mean that what Paul describes (returning literal values as
> subjects that occur in the signature) is not a correct behaviour
> although I can understand it and we had that in mind for other
> entailment regimes too, but according to the specs it wouldn't be the
> right thing to do. I guess I will give an example for the entailment
> regimes and take the approach that such queries are ill-formed, which
> is in accordance with the spec.

My understanding is that it is a legal query, it's prohibited neither  
by the syntax, nor the query algebra.

However, it can't ever match any RDF triples in the query processors  
data, as there can be no legal triples with literal subjects.

I don't remember the exact motivation, though I seem to remember that  
it came up in discussion in the DAWG group, but it does give us a  
level of future proofing, and allows systems which allow literal  
subjects to easily extend SPARQL to query their full data.

- Steve

-- 
Steve Harris
Garlik Limited, 2 Sheen Road, Richmond, TW9 1AE, UK
+44(0)20 8973 2465  http://www.garlik.com/
Registered in England and Wales 535 7233 VAT # 849 0517 11
Registered office: Thames House, Portsmouth Road, Esher, Surrey, KT10  
9AD

Received on Thursday, 24 September 2009 09:03:15 UTC