- From: Andy Seaborne <andy.seaborne@epimorphics.com>
- Date: Sat, 13 Oct 2012 09:46:48 +0100
- To: public-rdf-dawg-comments@w3.org
Jan,
(explanatory answer - not a formal WG response)
The spec deals with this by defining the node set of a graph as all
subjects and objects (not properties). This is closest to a
mathematical graph, which is a set of vertexes and set of edges; an RDF
graph is defined only as a set of edges.
http://www.w3.org/2009/sparql/docs/query-1.1/rq25.xml#defn_nodeSet
ZeroOrMorePath is then defined using nodes(G) for when the path is
unbounded at each end. The node set in question is the "active graph"
hence it's GRAPH <ng-01.ttl>.
When you start working with graph algorithms, the need for the set of
vertexes arises. The Node set of a graph is the minimal set to have all
the vertexes taking the triples as labelled edges of a graph. The
properties could be included, but property paths connect vertexes to
vertexes, treating the properties as edge labels, when viewed as a
mathematical graph.
Andy
On 11/10/12 16:29, Jan Wielemaker wrote:
> Hi,
>
> It is not really clear to me whether comments on test cases should be
> sent to this list. Maybe it is also a comment on the document though.
> I'm updating the ClioPatria SPARQL endpoint to 1.1.
>
> One issue that causes me trouble are test cases such as '(pp34) Named
> Graph 1'. The query is
>
> prefix : <http://www.example.org/>
> select ?t
> where {
> GRAPH <ng-01.ttl> {
> ?s :p1* ?t }
> }
>
> Given that the * operator matches zero steps and both end-points
> are variables, all resources are an answer. But, what are all
> resources? It seems the test cases assume all resources that
> appear as subject or object in the destination graph. But,
> why not all predicates too? ClioPatria can generate resources,
> but it has no clue to what graph these belong :-(
>
> Although I can write an implementation that will answer this
> question as the test-cases suggest it should be answered, I
> wonder whether it makes much sense to define the behaviour of
> this query exactly. ?x :p* ?y queries can never be answered on
> any sensible sized RDF graph anyway.
>
> I'd propose to either use :p1+ for these queries or specify either
> the subject or the object. That avoids these ambiguities.
>
> Cheers --- Jan
>
> P.s. Is there a better way to get the test cases than mirroring
> http://www.w3.org/2009/sparql/docs/tests/? I found a mirror
> git repository on GitHUB, but it was rather outdated when
> I checked.
>
Received on Saturday, 13 October 2012 08:47:18 UTC