Skip to content

Commit e93f355

Browse files
HolgerKnublauchafs
andauthored
Issue 426 (#427)
* #426: Remove support for $currentShape and $shapesGraph * #426: Editorial fixes * Update shacl12-sparql/index.html Co-authored-by: Andy Seaborne <[email protected]> --------- Co-authored-by: Andy Seaborne <[email protected]>
1 parent 099414f commit e93f355

File tree

3 files changed

+9
-119
lines changed

3 files changed

+9
-119
lines changed

shacl12-sparql/index.html

Lines changed: 9 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1046,8 +1046,7 @@ <h3>Validation with SPARQL-based Constraints</h3>
10461046
There are no validation results if the <a>SPARQL-based constraint</a> has <code>true</code>
10471047
as a <a>value</a> for the property <code>sh:deactivated</code>.
10481048
Otherwise, execute the SPARQL query specified by the <a>SPARQL-based constraint</a> <code>$sparql</code>
1049-
<a>pre-binding</a> the variables <code>this</code> and, if supported,
1050-
<code>shapesGraph</code> and <code>currentShape</code> as described in <a href="#sparql-constraints-prebound"></a>.
1049+
<a>pre-binding</a> the variable <code>this</code> as described in <a href="#sparql-constraints-prebound"></a>.
10511050
If the <a>shape</a> is a <a>property shape</a>, then prior to execution
10521051
<dfn data-lt="substituted">substitute</dfn> the variable <code>PATH</code> where it appears in the <a>predicate</a>
10531052
position of a <a data-cite="sparql12-query/#QSynTriples">triple pattern</a>
@@ -1059,42 +1058,13 @@ <h3>Validation with SPARQL-based Constraints</h3>
10591058
</div>
10601059
</div>
10611060
<section id="sparql-constraints-prebound">
1062-
<h4>Pre-bound Variables in SPARQL Constraints ($this, $shapesGraph, $currentShape)</h4>
1061+
<h4>Pre-bound variable $this in SPARQL Constraints</h4>
10631062
<p>
10641063
When the SPARQL queries of <a>SPARQL-based constraints</a> and the <a>validators</a>
10651064
of <a>SPARQL-based constraint components</a> are <a data-cite="shacl12-core/#validation-definition">processed</a>,
1066-
the SHACL-SPARQL processor <a>pre-binds</a> values for the variables in the following table.
1065+
the SHACL-SPARQL processor <a>pre-binds</a> values for the variable <code>$this</code>
1066+
to the current <a>focus node</a>.
10671067
</p>
1068-
<table class="term-table">
1069-
<tr>
1070-
<th>Variable</th>
1071-
<th>Interpretation</th>
1072-
</tr>
1073-
<tr>
1074-
<td><code>this</code></td>
1075-
<td>
1076-
The <a>focus node</a>.
1077-
</td>
1078-
</tr>
1079-
<tr>
1080-
<td><code style="white-space: nowrap">shapesGraph</code> (Optional)</td>
1081-
<td>
1082-
Can be used to query the shapes graph as in <code>GRAPH $shapesGraph { ... }</code>.
1083-
If the shapes graph is a named graph in the same dataset as the data graph then it is the <a>IRI</a> of the shapes graph in the dataset.
1084-
Not all SHACL-SPARQL processors need to support this variable.
1085-
Processors that do not support the variable <code>shapesGraph</code> MUST report a <a>failure</a> if they encounter a query that references this variable.
1086-
Use of <code>GRAPH $shapesGraph { ... }</code> should be handled with extreme caution.
1087-
It may result in constraints that are not interoperable across different SHACL-SPARQL processors and that may not run on remote RDF datasets.
1088-
</td>
1089-
</tr>
1090-
<tr>
1091-
<td><code style="white-space: nowrap">currentShape</code> (Optional)</td>
1092-
<td>
1093-
The current <a>shape</a>. Typically used in conjunction with the variable <code>shapesGraph</code>.
1094-
The same support policies as for <code>shapesGraph</code> apply for this variable.
1095-
</td>
1096-
</tr>
1097-
</table>
10981068
</section>
10991069
<section id="sparql-constraints-variables">
11001070
<h4>Mapping of Solution Bindings to Result Properties</h4>
@@ -1284,7 +1254,7 @@ <h4>Parameter Declarations (sh:parameter)</h4>
12841254
</p>
12851255
<p class="syntax">
12861256
<span data-syntax-rule="parameter-name-VARNAME">Every <a>parameter name</a> is a valid <a data-cite="sparql12-query/#rVARNAME">SPARQL VARNAME</a>.</span>
1287-
<span data-syntax-rule="parameter-name-not-in"><a>Parameter names</a> must not be one of the following: <code>this</code>, <code>shapesGraph</code>, <code>currentShape</code>, <code>path</code>, <code>PATH</code>, <code>value</code>.</span>
1257+
<span data-syntax-rule="parameter-name-not-in"><a>Parameter names</a> must not be one of the following: <code>this</code>, <code>path</code>, <code>PATH</code>, <code>value</code>.</span>
12881258
<span data-syntax-rule="parameter-name-unique">A constraint component where two or more <a>parameter declarations</a> use the same <a>parameter names</a> is <a>ill-formed</a>.</span>
12891259
</p>
12901260
<p class="syntax">
@@ -1584,9 +1554,8 @@ <h3>Validation with SPARQL-based Constraint Components</h3>
15841554
</li>
15851555
</ul>
15861556
<p>
1587-
The SPARQL query executions above MUST <a>pre-bind</a> the variables
1588-
<code>this</code> and, if supported, <code>shapesGraph</code> and <code>currentShape</code>
1589-
as described in <a href="#sparql-constraints-prebound"></a>.
1557+
The SPARQL query executions above MUST <a>pre-bind</a> the variable
1558+
<code>this</code> as described in <a href="#sparql-constraints-prebound"></a>.
15901559
In addition, each <a>value</a> of a <a>parameter</a> of the <a>constraint component</a> in the <a>constraint</a>
15911560
MUST be <a>pre-bound</a> as a variable that has the <a>parameter name</a> as its name.
15921561
</p>
@@ -2014,7 +1983,7 @@ <h2>Pre-binding of Variables in SPARQL Queries</h2>
20141983
SHACL-SPARQL processors MUST report a <a>failure</a> when it is operating on a <a>shapes graph</a>
20151984
that contains SHACL-SPARQL queries (via <code>sh:select</code> and <code>sh:ask</code>) that violate any of these restrictions.
20161985
Note that the term <em>potentially pre-bound variables</em> includes the variables <code>this</code>,
2017-
<code>shapesGraph</code>, <code>currentShape</code>, <code>value</code> (for ASK queries),
1986+
<code>value</code> (for ASK queries),
20181987
and any variables that represent the <a>parameters</a> of the <a>constraint component</a> that uses the query.
20191988
<!-- This is so that the checking can be performed once, not required each time. -->
20201989
</p>
@@ -2273,21 +2242,6 @@ <h3>sh:lessThanOrEquals</h3>
22732242
$this $lessThanOrEquals ?otherValue .
22742243
BIND (?value &lt;= ?otherValue AS ?result) .
22752244
FILTER (!bound(?result) || !(?result)) .
2276-
}</pre>
2277-
</div>
2278-
</section>
2279-
<section id="sparql-definition-in">
2280-
<h3>sh:in</h3>
2281-
<p>
2282-
The following query expresses a potential SPARQL-based validator for <a data-cite="shacl12-core#InConstraintComponent">sh:in</a>.
2283-
</p>
2284-
<div class="def def-sparql">
2285-
<div class="def-header">POTENTIAL DEFINITION IN SPARQL (Must evaluate to true for each value node $value)</div>
2286-
<pre class="def-sparql-body">
2287-
ASK {
2288-
GRAPH $shapesGraph {
2289-
$in (rdf:rest*)/rdf:first $value .
2290-
}
22912245
}</pre>
22922246
</div>
22932247
</section>
@@ -2335,6 +2289,7 @@ <h2>Changes between SHACL 1.0 SPARQL and SHACL 1.2 SPARQL Extensions</h2>
23352289
<li>Added support for <a>annotation properties</a>, see <a href="https://github.com/w3c/data-shapes/issues/327">Issue 327</a></li>
23362290
<li>Added the <a>node expression function</a> <a href="#SPARQLExprExpression"><code>sh:SPARQLExprExpression</code></a>, see <a href="https://github.com/w3c/data-shapes/issues/315">Issue 315</a></li>
23372291
<li>Clarified that VALUES clauses are only disallowed when they mention <a href="#pre-binding">pre-bound variables</a> and removed the restriction on sub-SELECTs, see <a href="https://github.com/w3c/data-shapes/issues/159">Issue 159</a></li>
2292+
<li>Removed support for the optional pre-bound variables <code>shapesGraph</code> and <code>currentShape</code>, see <a href="https://github.com/w3c/data-shapes/issues/426">Issue 426</a></li>
23382293
</ul>
23392294
</section>
23402295

shacl12-test-suite/tests/sparql/pre-binding/manifest.ttl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
mf:include <pre-binding-005.ttl> ;
1313
mf:include <pre-binding-006.ttl> ;
1414
mf:include <pre-binding-007.ttl> ;
15-
mf:include <shapesGraph-001.ttl> ;
1615
mf:include <unsupported-sparql-001.ttl> ;
1716
mf:include <unsupported-sparql-002.ttl> ;
1817
mf:include <unsupported-sparql-003.ttl> ;

shacl12-test-suite/tests/sparql/pre-binding/shapesGraph-001.ttl

Lines changed: 0 additions & 64 deletions
This file was deleted.

0 commit comments

Comments
 (0)