Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions sparql/sparql10/graph/data-optional.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@prefix : <http://example/> .

:s :p :o .
:s2 :p <> .
5 changes: 5 additions & 0 deletions sparql/sparql10/graph/graph-optional.rq
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
PREFIX : <http://example/>

SELECT ?g ?s {
GRAPH ?g { ?s ?p ?o OPTIONAL { ?s ?p ?g } }
}
13 changes: 13 additions & 0 deletions sparql/sparql10/graph/graph-optional.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
@prefix : <http://example/> .
@prefix rs: <http://www.w3.org/2001/sw/DataAccess/tests/result-set#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

[] rdf:type rs:ResultSet ;
rs:resultVariable "g" , "s" ;
rs:solution [ rs:binding [ rs:value <data-optional.ttl> ;
rs:variable "g"
] ;
rs:binding [ rs:value :s2 ;
rs:variable "s"
]
] .
26 changes: 26 additions & 0 deletions sparql/sparql10/graph/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,32 @@ <h2>
</dd>
</dl>
</dd>
<dt id='graph-optional'>
<a class='testlink' href='#graph-optional'>
graph-optional:
</a>
<span about='http://www.w3.org/2001/sw/DataAccess/tests/data-r2/graph/manifest#graph-optional' property='mf:name'>graph-optional</span>
</dt>
<dd inlist='true' property='mf:entry' resource='http://www.w3.org/2001/sw/DataAccess/tests/data-r2/graph/manifest#graph-optional' typeof='mf:QueryEvaluationTest'>
<div property='rdfs:comment'>
<p>The variable bound by the GRAPH operator is not used when evaluating a nested OPTIONAL</p>
</div>
<dl class='test-detail'>
<dt>type</dt>
<dd>mf:QueryEvaluationTest</dd>
<dt>approval</dt>
<dd property='mf:approval' resource=''></dd>
<dt>action</dt>
<dd>
<dl class='test-detail'>
</dl>
</dd>
<dt>result</dt>
<dd>
<a href='graph-optional.ttl' property='mf:result'>graph-optional.ttl</a>
</dd>
</dl>
</dd>
</dl>
</div>
<footer>
Expand Down
11 changes: 11 additions & 0 deletions sparql/sparql10/graph/manifest.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
:graph-not-exist
:graph-variable-scope
:graph-variable-join
:graph-optional
).

:dawg-graph-01 rdf:type mf:QueryEvaluationTest ;
Expand Down Expand Up @@ -227,3 +228,13 @@
] ;
mf:result <graph-variable-join.ttl> ;
.
:graph-optional rdf:type mf:QueryEvaluationTest ;
Comment thread
Tpt marked this conversation as resolved.
mf:name "graph-optional" ;
rdfs:comment "The variable bound by the GRAPH operator is not used when evaluating a nested OPTIONAL" ;
mf:action
[ qt:query <graph-optional.rq> ;
qt:graphData <data-optional.ttl> ;
qt:graphData <data-g1.ttl>
] ;
mf:result <graph-optional.ttl> ;
.