Re: rdf:li & rdfs:member

Olivier Corby wrote on 06/05/2007 05:45:22 AM:

> 
> RDF provides the rdf:li syntax that generates rdf:_1 ... rdf:_n 
> properties for describing  containers elements. What is the status of 
> rdf:li in SPARQL ?
> 
> What does this query mean  :
> 
> select * where {
>     ?s rdf:type rdf:Sequence
>     ?s rdf:li ?v1
>     ?s rdf:li ?v2
> }

<rdf:li> is a special element in the RDF/XML serialization of an RDF 
graph. It increments a counter for the containing element to generate the 
_1, _2, etc. properties. An RDF/XML document that uses rdf:li does not 
actually generate any triples whose predicate is 
http://www.w3.org/1999/02/22-rdf-syntax-ns#li. The prefixed name rdf:li 
has no special meaning in SPARQL, so the above query would look for 
triples with a predicate of http://www.w3.org/1999/02/22-rdf-syntax-ns#li, 
which are unlikely to exist.

> In addition, what is the status of  rdfs:member in SPARQL ?
> Does it match the rdf:_n properties in the target graph ? Hence, does 
> this query return the values of the sequence :
> 
> select * where {
>     ?s rdf:type rdf:Sequence
>     ?s rdfs:member ?v
> }

RDF Schema defines ( http://www.w3.org/TR/rdf-schema/#ch_member ) 
rdfs:member to be a super-property of the container membership properties 
(rdf:_1, rdf:_2, etc.). The SPARQL specification does not do anything 
special for RDF-S entailment, so rdfs:member is not privileged in any way. 
Hwever, a particular SPARQL implementation or endpoint may be configured 
to execute queries against a 'virtual' graph formed from the closure of a 
base graph under RDF-S entailment. In this case, the above query would 
find values in the sequence. (If you are querying against a graph that 
does not contain triples inferred from RDF Schema entailments and your 
query engine is not treating the graph as a virtual graph containing the 
entailed triples, then the above query will not find values in the 
sequence.)

Lee

Received on Tuesday, 5 June 2007 18:55:05 UTC