Transitive properties

> http://lists.w3.org/Archives/Public/public-swbp-wg/2005Nov/0036

Some thoughts:

David notes that support for transitive closure is an alternative approach for 
told bNodes.  Support for transitive closure isn't necessary if it is declared 
outside the query but I think the community expectation will be syntax in the 
query itself.

I tried generalizing this to property regular expressions (PRE's) with * + ? 
() {N,M} operators plus / for path traversal and | for alternative choicies. 
(These path expressions are different from cwm's which name nodes IIUC) This 
is not implemented completely yet but the syntax worked out (the one oddball 
case is a trailing "?" because it can start variables - greedy tokenization 
does the right thing because qnames must have a ":" in them and there is an 
explicit path traversal operator).

Examples:

Lists:
{ ?someList rdf:rest*/rdf:first ?item . }

Hierarchies:
{ ?A rdfs:subClassOf+ ?B }

{ ?x rdf:type/rdfs:subClassOf* ?t }

{ ?book dc10:title|dc11:title ?title }

I guess simple * is a bit odd but:

{ ?A :p* ?B }

would include the no-property path from ?A to ?B so always be true if ?A can 
be bound.

(Not proposing it for this WG.)

	Andy

Received on Tuesday, 8 November 2005 13:53:58 UTC