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

Re: [TF-PP] Zero-length paths (ACTION-251)

From: Andy Seaborne <andy.seaborne@talis.com>
Date: Fri, 04 Jun 2010 12:32:22 +0100
Message-ID: <4C08E446.9040705@talis.com>
To: Gregory Williams <greg@evilfunhouse.com>
CC: SPARQL Working Group WG <public-rdf-dawg@w3.org>
> One approach to avoiding the infinite answers is to restrict zero-length path matching to only those terms that appear in the graph (in either subject, predicate, or object positions). This would result in answers true, false, false, and 3 for examples 1-4, respectively.
> Thoughts?

Another possibility is all subjects + all objects as subjects and 
objects are the only things returnable by paths.

Gives a count of 2 for
SELECT (COUNT(*) AS ?count) WHERE { ?start :p{0} ?end }

Other examples/Test cases are paths rooted at one end only:

SELECT ?x { :s :p{0} ?x }
SELECT ?x { ?x :p{0} :s }
SELECT ?x { :sNot :p{0} ?x }
SELECT ?x { ?x :p{0} :sNot }

Received on Friday, 4 June 2010 11:32:25 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:01:00 UTC