Skip to content
Open
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
23 changes: 12 additions & 11 deletions shacl12-sparql/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ <h3>Terminology</h3>
<dfn data-cite="shacl12-core#dfn-focus-graph" data-lt="focus graph">focus graph</dfn>,
<dfn data-cite="shacl12-core#dfn-conform" data-lt="conform|conforms">conform</dfn>,
<dfn data-cite="shacl12-core#dfn-failure" data-lt="failure|failures">failure</dfn>,
<dfn data-cite="shacl12-core#dfn-validation-result" data-lt="validation result">validation result</dfn>,
<dfn data-cite="shacl12-core#dfn-shacl-instance" data-lt="shacl instance">SHACL instance</dfn>,
<dfn data-cite="shacl12-core#dfn-shacl-subclass" data-lt="shacl subclass">SHACL subclass</dfn>,
<dfn data-cite="shacl12-core#dfn-shacl-type" data-lt="shacl type">SHACL type</dfn>,
Expand Down Expand Up @@ -582,8 +583,8 @@ <h3>An Example SPARQL-based Constraint</h3>
</aside>
<p>
The SPARQL query returns result set <a>solutions</a> for all bindings of the variable <code>value</code> that violate the constraint.
There is a validation result for each <a>solution</a> in that result set, applying the <a href="#sparql-constraints-validation">mapping rules</a> explained later.
In this example, each validation result will have the <a>binding</a> for the variable <code>this</code> as the <code>sh:focusNode</code>,
There is a <a>validation result</a> for each <a>solution</a> in that result set, applying the <a href="#sparql-constraints-validation">mapping rules</a> explained later.
In this example, each <a>validation result</a> will have the <a>binding</a> for the variable <code>this</code> as the <code>sh:focusNode</code>,
<code>ex:germanLabel</code> as <code>sh:resultPath</code> and the violating value as <code>sh:value</code>.
</p>
<p>
Expand Down Expand Up @@ -781,7 +782,7 @@ <h3>Validation with SPARQL-based Constraints</h3>
<div class="def-header">TEXTUAL DEFINITION</div>
<div class="def-text-body">
Let <code>$sparql</code> be a <a>value</a> of <code>sh:sparql</code>.
There are no validation results if the <a>SPARQL-based constraint</a> has <code>true</code>
There are no <a>validation results</a> if the <a>SPARQL-based constraint</a> has <code>true</code>
as a <a>value</a> for the property <code>sh:deactivated</code>.
Otherwise, execute the SPARQL query specified by the <a>SPARQL-based constraint</a> <code>$sparql</code>
<a>pre-binding</a> the variable <code>this</code> as described in <a href="#sparql-constraints-prebound"></a>.
Expand All @@ -790,8 +791,8 @@ <h3>Validation with SPARQL-based Constraints</h3>
position of a <a data-cite="sparql12-query/#QSynTriples">triple pattern</a>
with a valid SPARQL surface syntax string of the <a>SHACL property path</a>
specified via <code>sh:path</code> at the <a>property shape</a>.
<span id="sparql-constraints-validation-rule">There is one validation result for each <a>solution</a> that does not have <code>true</code> as the <a>binding</a> for the variable <code>failure</code>.
These validation results MUST have the property values explained in <a href="#sparql-constraints-variables"></a>.
<span id="sparql-constraints-validation-rule">There is one <a>validation result</a> for each <a>solution</a> that does not have <code>true</code> as the <a>binding</a> for the variable <code>failure</code>.
These <a>validation results</a> MUST have the property values explained in <a href="#sparql-constraints-variables"></a>.
A <a>failure</a> MUST be produced if and only if one of the <a>solutions</a> has <code>true</code> as the <a>binding</a> for <code>failure</code>.</span>
</div>
</div>
Expand All @@ -807,7 +808,7 @@ <h4>Pre-bound variable $this in SPARQL Constraints</h4>
<section id="sparql-constraints-variables">
<h4>Mapping of Solution Bindings to Result Properties</h4>
<p>
The property <a>values</a> of the validation result nodes are derived by the following rules, through a combination of result solutions and the values of the constraint itself.
The property <a>values</a> of the <a>validation result</a> nodes are derived by the following rules, through a combination of result solutions and the values of the constraint itself.
The rules are meant to be executed from top to bottom, so that the first bound value will be used.
</p>
<table class="term-table">
Expand Down Expand Up @@ -1301,7 +1302,7 @@ <h3>Validation with SPARQL-based Constraint Components</h3>
MUST be <a>pre-bound</a> as a variable that has the <a>parameter name</a> as its name.
</p>
<p>
The production rules for the validation results are identical to those for <a href="#sparql-constraints-validation-rule">SPARQL-based constraints</a>,
The production rules for the <a>validation results</a> are identical to those for <a href="#sparql-constraints-validation-rule">SPARQL-based constraints</a>,
using the <a>solutions</a> <code>QS</code> as produced above.
</p>
</section>
Expand All @@ -1311,12 +1312,12 @@ <h3>Validation with SPARQL-based Constraint Components</h3>
<h2>Annotation Properties</h2>
<p>
This section extends the general <a href="#sparql-constraints-variables">mechanism</a>
to produce validation results using <a href="sparql-constraints">SPARQL-based constraints</a> or
to produce <a>validation results</a> using <a href="sparql-constraints">SPARQL-based constraints</a> or
<a href="sparql-constraint-components">constraint components</a>.
</p>
<p>
Implementations that support this feature make it possible to inject <dfn>annotation properties</dfn>
into the validation result nodes created for each <a>solution</a> produced by the <code>SELECT</code> queries of a
into the <a>validation result</a> nodes created for each <a>solution</a> produced by the <code>SELECT</code> queries of a
SPARQL-based <a>constraint</a> or <a>constraint component</a>.
Any such annotation property needs to be declared via a <a>value</a> of <code>sh:resultAnnotation</code> at
the <a>subject</a> of the <code>sh:select</code> or <code>sh:ask</code> <a>triple</a>.
Expand Down Expand Up @@ -1370,7 +1371,7 @@ <h2>Annotation Properties</h2>
<p>
If a variable name could be determined, then the SHACL processor copies the <a>binding</a> for the given variable
as a value for the property specified using <code>sh:annotationProperty</code>
into the validation result that is being produced for the current <a>solution</a>.
into the <a>validation result</a> that is being produced for the current <a>solution</a>.
If the variable has no <a>binding</a> in the result set <a>solution</a>,
then the <a>values</a> of <code>sh:annotationValue</code> are used, if present.
</p>
Expand Down Expand Up @@ -1884,7 +1885,7 @@ <h3>sh:minExclusive (etc)</h3>
The following query expresses a potential SPARQL-based validator for <a data-cite="shacl12-core#MinExclusiveConstraintComponent">sh:minExclusive</a>.
The SPARQL expression produces an error if the value node cannot be compared to the specified range,
for example when someone compares a string with an integer.
If the comparison cannot be performed, then there is a validation result.
If the comparison cannot be performed, then there is a <a>validation result</a>.
This is different from, say, a plain SPARQL query, in which such errors would silently not lead to any results.
</p>
<div class="def def-sparql">
Expand Down