Skip to content

Commit 2c863ec

Browse files
authored
SPARQL 1.1: property path: * and ? with a set start/end do not check if the term exists in the graph (#264)
1 parent 80d776f commit 2c863ec

10 files changed

Lines changed: 192 additions & 1 deletion

sparql/sparql11/property-path/index.html

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -753,6 +753,106 @@ <h2>
753753
</dd>
754754
</dl>
755755
</dd>
756+
<dt id='zero_or_more_set_start'>
757+
<a class='testlink' href='#zero_or_more_set_start'>
758+
zero_or_more_set_start:
759+
</a>
760+
<span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/property-path/manifest#zero_or_more_set_start' property='mf:name'>* with start being a constant on the empty dataset</span>
761+
</dt>
762+
<dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/property-path/manifest#zero_or_more_set_start' typeof='mf:QueryEvaluationTest'>
763+
<div property='rdfs:comment'>
764+
</div>
765+
<dl class='test-detail'>
766+
<dt>type</dt>
767+
<dd>mf:QueryEvaluationTest</dd>
768+
<dt>approval</dt>
769+
<dd property='mf:approval' resource=''></dd>
770+
<dt>action</dt>
771+
<dd>
772+
<dl class='test-detail' property='mf:action' resource=''>
773+
</dl>
774+
</dd>
775+
<dt>result</dt>
776+
<dd>
777+
<a href='zero_or_more_set_start.srx' property='mf:result'>zero_or_more_set_start.srx</a>
778+
</dd>
779+
</dl>
780+
</dd>
781+
<dt id='zero_or_more_set_end'>
782+
<a class='testlink' href='#zero_or_more_set_end'>
783+
zero_or_more_set_end:
784+
</a>
785+
<span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/property-path/manifest#zero_or_more_set_end' property='mf:name'>* with end being a constant on the empty dataset</span>
786+
</dt>
787+
<dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/property-path/manifest#zero_or_more_set_end' typeof='mf:QueryEvaluationTest'>
788+
<div property='rdfs:comment'>
789+
</div>
790+
<dl class='test-detail'>
791+
<dt>type</dt>
792+
<dd>mf:QueryEvaluationTest</dd>
793+
<dt>approval</dt>
794+
<dd property='mf:approval' resource=''></dd>
795+
<dt>action</dt>
796+
<dd>
797+
<dl class='test-detail' property='mf:action' resource=''>
798+
</dl>
799+
</dd>
800+
<dt>result</dt>
801+
<dd>
802+
<a href='zero_or_more_set_end.srx' property='mf:result'>zero_or_more_set_end.srx</a>
803+
</dd>
804+
</dl>
805+
</dd>
806+
<dt id='zero_or_one_set_start'>
807+
<a class='testlink' href='#zero_or_one_set_start'>
808+
zero_or_one_set_start:
809+
</a>
810+
<span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/property-path/manifest#zero_or_one_set_start' property='mf:name'>? with start being a constant on the empty dataset</span>
811+
</dt>
812+
<dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/property-path/manifest#zero_or_one_set_start' typeof='mf:QueryEvaluationTest'>
813+
<div property='rdfs:comment'>
814+
</div>
815+
<dl class='test-detail'>
816+
<dt>type</dt>
817+
<dd>mf:QueryEvaluationTest</dd>
818+
<dt>approval</dt>
819+
<dd property='mf:approval' resource=''></dd>
820+
<dt>action</dt>
821+
<dd>
822+
<dl class='test-detail' property='mf:action' resource=''>
823+
</dl>
824+
</dd>
825+
<dt>result</dt>
826+
<dd>
827+
<a href='zero_or_one_set_start.srx' property='mf:result'>zero_or_one_set_start.srx</a>
828+
</dd>
829+
</dl>
830+
</dd>
831+
<dt id='zero_or_one_set_end'>
832+
<a class='testlink' href='#zero_or_one_set_end'>
833+
zero_or_one_set_end:
834+
</a>
835+
<span about='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/property-path/manifest#zero_or_one_set_end' property='mf:name'>? with end being a constant on the empty dataset</span>
836+
</dt>
837+
<dd inlist='true' property='mf:entry' resource='http://www.w3.org/2009/sparql/docs/tests/data-sparql11/property-path/manifest#zero_or_one_set_end' typeof='mf:QueryEvaluationTest'>
838+
<div property='rdfs:comment'>
839+
</div>
840+
<dl class='test-detail'>
841+
<dt>type</dt>
842+
<dd>mf:QueryEvaluationTest</dd>
843+
<dt>approval</dt>
844+
<dd property='mf:approval' resource=''></dd>
845+
<dt>action</dt>
846+
<dd>
847+
<dl class='test-detail' property='mf:action' resource=''>
848+
</dl>
849+
</dd>
850+
<dt>result</dt>
851+
<dd>
852+
<a href='zero_or_one_set_end.srx' property='mf:result'>zero_or_one_set_end.srx</a>
853+
</dd>
854+
</dl>
855+
</dd>
756856
</dl>
757857
</div>
758858
<footer>

sparql/sparql11/property-path/manifest.ttl

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@
4141
:values_and_path
4242
:nps_inverse
4343
:nps_direct_and_inverse
44+
:zero_or_more_set_start
45+
:zero_or_more_set_end
46+
:zero_or_one_set_start
47+
:zero_or_one_set_end
4448
) .
4549

4650

@@ -304,10 +308,37 @@
304308
qt:data <nps_inverse.ttl> ] ;
305309
mf:result <nps_inverse.srx> .
306310

307-
308311
:nps_direct_and_inverse rdf:type mf:QueryEvaluationTest ;
309312
mf:name "Negated Property Set with both direct and inverse properties" ;
310313
mf:action
311314
[ qt:query <nps_direct_and_inverse.rq> ;
312315
qt:data <nps_direct_and_inverse.ttl> ] ;
313316
mf:result <nps_direct_and_inverse.srx> .
317+
318+
:zero_or_more_set_start rdf:type mf:QueryEvaluationTest ;
319+
mf:name "* with start being a constant on the empty dataset" ;
320+
mf:action
321+
[ qt:query <zero_or_more_set_start.rq> ;
322+
qt:data <empty.ttl> ] ;
323+
mf:result <zero_or_more_set_start.srx> .
324+
325+
:zero_or_more_set_end rdf:type mf:QueryEvaluationTest ;
326+
mf:name "* with end being a constant on the empty dataset" ;
327+
mf:action
328+
[ qt:query <zero_or_more_set_end.rq> ;
329+
qt:data <empty.ttl> ] ;
330+
mf:result <zero_or_more_set_end.srx> .
331+
332+
:zero_or_one_set_start rdf:type mf:QueryEvaluationTest ;
333+
mf:name "? with start being a constant on the empty dataset" ;
334+
mf:action
335+
[ qt:query <zero_or_one_set_start.rq> ;
336+
qt:data <empty.ttl> ] ;
337+
mf:result <zero_or_one_set_start.srx> .
338+
339+
:zero_or_one_set_end rdf:type mf:QueryEvaluationTest ;
340+
mf:name "? with end being a constant on the empty dataset" ;
341+
mf:action
342+
[ qt:query <zero_or_one_set_end.rq> ;
343+
qt:data <empty.ttl> ] ;
344+
mf:result <zero_or_one_set_end.srx> .
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
PREFIX : <http://example/>
2+
SELECT ?o WHERE { :s :p* ?o }
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0"?>
2+
<sparql xmlns="http://www.w3.org/2005/sparql-results#">
3+
<head>
4+
<variable name="o"/>
5+
</head>
6+
<results>
7+
<result>
8+
<binding name="o">
9+
<uri>http://example/s</uri>
10+
</binding>
11+
</result>
12+
</results>
13+
</sparql>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
PREFIX : <http://example/>
2+
SELECT ?s WHERE { ?s :p* :o }
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0"?>
2+
<sparql xmlns="http://www.w3.org/2005/sparql-results#">
3+
<head>
4+
<variable name="s"/>
5+
</head>
6+
<results>
7+
<result>
8+
<binding name="s">
9+
<uri>http://example/o</uri>
10+
</binding>
11+
</result>
12+
</results>
13+
</sparql>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
PREFIX : <http://example/>
2+
SELECT ?o WHERE { :s :p? ?o }
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0"?>
2+
<sparql xmlns="http://www.w3.org/2005/sparql-results#">
3+
<head>
4+
<variable name="o"/>
5+
</head>
6+
<results>
7+
<result>
8+
<binding name="o">
9+
<uri>http://example/s</uri>
10+
</binding>
11+
</result>
12+
</results>
13+
</sparql>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
PREFIX : <http://example/>
2+
SELECT ?s WHERE { ?s :p? :o }
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0"?>
2+
<sparql xmlns="http://www.w3.org/2005/sparql-results#">
3+
<head>
4+
<variable name="s"/>
5+
</head>
6+
<results>
7+
<result>
8+
<binding name="s">
9+
<uri>http://example/o</uri>
10+
</binding>
11+
</result>
12+
</results>
13+
</sparql>

0 commit comments

Comments
 (0)