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

Re: property paths three more test cases pp13, pp14, pp15

From: Andy Seaborne <andy.seaborne@epimorphics.com>
Date: Tue, 21 Dec 2010 12:39:33 +0000
Message-ID: <4D10A005.8050504@epimorphics.com>
To: Steve Harris <steve.harris@garlik.com>
CC: Axel Polleres <axel.polleres@deri.org>, SPARQL Working Group <public-rdf-dawg@w3.org>

>>
>> One example is:
>>
>>    ?x rdf:type/rdfs:subClassOf* ?T
>
> I see, otherwise you'd have to write ?x (rdf:type|rdf:type/rdfs:subClassOf*) ?T, which looks a bit tautological.

Yes.

> On the other hand, trying to find just the transitively closed subclass relationships with:
>
> ?C rdfs:subClassOf* ?SC .
>
> you will get many non-sensical results. I think you can write
>
> [] rdfs:subClassOf ?SC .
> ?C rdfs:subClassOf [] .
> ?C rdfs:subClassOf* ?SC .
>
> if you want just the transitively closed classes/superclasses, but that also looks odd.

Isn't transitive closure "+"

?C rdfs:subClassOf+ ?SC .

> I'm also concerned that the relatively innocuous-looking expression like { ?s rdfs:subClassOf* ?o } will have a higher cardinality than { ?s ?p ?o }, but I guess users will learn not to do that after the first few hundred times they try it :)

?s rdfs:subClassOf* ?o  will have ?s = ?o, not the cross product of the 
subjects and objects.

{ ?s ?p ?o } could have more cardinality.

:x :p1 :y .
:x :p2 :y .
:x :p3 :y .
:x :p4 :y .

{ ?s rdfs:subClassOf* ?o } => cardinality 2

?s=:x, ?o=:x
?s=:y, ?o=:y

and

{?s ?p ?o } is 4 rows.

It can be odd that "?x :p* ?o" does not depend on :p but it's similar to 
string regex:

"xyz" is matched by "a*"

Given

:x :p* ?x => ?x = :p
then
?y :p* ?x => ?x = ?y = nodes set of subjects and objects is the point we 
get to.

	Andy

>
> - Steve
>
>> which is
>>
>>    ?x rdf:type ?Z
>>    ?Z rdfs:subClassOf* ?T
>>
>> Under RDFS:
>>
>>   <C>  rdfs:subClassOf<C>
>>
>> If you are writing that over plain data, you need "a rdfs:subClassOf* a" (the {0} case) to get the subclass effect or a more complex query.
>>
>> 	Andy
>
Received on Tuesday, 21 December 2010 12:40:13 GMT

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