Skip to content

Commit f6e8430

Browse files
#338: Generalized sh:deactivated to node expressions (#372)
* #338: Generalized sh:deactivated to node expressions * #338: Improved linkage to constant literal NEs
1 parent 5444fbb commit f6e8430

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

shacl12-core/index.html

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1964,13 +1964,21 @@ <h4>Declaring Messages for a Shape</h4>
19641964
<h4>Deactivating a Shape</h4>
19651965
<p class="syntax">
19661966
<span data-syntax-rule="deactivated-maxCount">Shapes can have at most one value for the property <code>sh:deactivated</code>.</span>
1967-
<span data-syntax-rule="deactivated-datatype">The value of <code>sh:deactivated</code> in a shape must be either <code>true</code> or <code>false</code>.</span>
1967+
<span data-syntax-rule="deactivated-datatype">The value of <code>sh:deactivated</code> in a shape is a <a>node expression</a>
1968+
that must have either <code>true</code> or <code>false</code> as the (only) <a>output node</a>.</span>
19681969
</p>
19691970
<p>
1970-
A shape that has the <a>value</a> <code>true</code> for the property <code>sh:deactivated</code> is called <dfn data-lt="deactivate">deactivated</dfn>.
1971+
Let <code>expr</code> be the <a>value</a> of <code>sh:deactivated</code> in a <a>shape</a>.
1972+
If <code>evalExpr(expr, <a>data graph</a>, <a>focus node</a>, {})</code> produces <code>true</code> as its only
1973+
<a>output node</a>, the shape is called <dfn data-lt="deactivate">deactivated</dfn>.
19711974
All RDF terms <a>conform</a> to a deactivated shape.
19721975
</p>
19731976
<p><em>The remainder of this section is informative.</em></p>
1977+
<p>
1978+
In SHACL Core, the only valid values for <code>sh:deactivated</code> are the
1979+
<a href="#LiteralExpression">constant literal node expressions</a>
1980+
<code>true</code> and <code>false</code>.
1981+
</p>
19741982
<p>
19751983
Use cases of this feature include shape reuse and debugging.
19761984
In scenarios where shapes from other graphs or files are imported into a given <a>shapes graph</a>,
@@ -2399,7 +2407,7 @@ <h2>Node Expressions</h2>
23992407
<li>At <a href="#property-shapes"><code>sh:values</code> and <code>sh:defaultValue</code></a> to derive the value nodes of a property shape.</li>
24002408
<li>At <a href="#targetNode"><code>sh:targetNode</code></a> to dynamically compute the targets of a shape.</li>
24012409
<li>At <a href="#ExpressionConstraintComponent"><code>sh:expression</code></a> to validate nodes against a condition.</li>
2402-
<li>At <a href="#deactivated"><code>sh:deactivated</code></a> to deactivate certain shapes under specific conditions. <span class="todo">TODO: This change needs to be made still, see ISSUE 338.</span></li>
2410+
<li>At <a href="#deactivated"><code>sh:deactivated</code></a> to deactivate certain shapes under specific conditions.</li>
24032411
</ul>
24042412
<p>
24052413
Readers who are only interested in SHACL Core can typically skip this section.
@@ -6590,7 +6598,7 @@ <h2>Revision History</h2>
65906598
<section class="appendix informative" id="changes-12">
65916599
<h2>Changes between SHACL 1.0 Core and SHACL 1.2 Core</h2>
65926600
<ul>
6593-
<li>Introduced <a>node expressions</a> as an extension point to dynamically compute lists of nodes. Generalized <code>sh:targetNode</code> and <code>sh:defaultValue</code>, and introduced <code>sh:values</code> to support node expressions.</li>
6601+
<li>Introduced <a>node expressions</a> as an extension point to dynamically compute lists of nodes. Generalized <code>sh:targetNode</code>, <code>sh:deactivated</code> and <code>sh:defaultValue</code>, and introduced <code>sh:values</code> to support node expressions.</li>
65946602
<li>Added the new constraint component <a href="#SingleLineConstraintComponent"><code>sh:singleLine</code></a>, see <a href="https://github.com/w3c/data-shapes/issues/177">Issue 177</a></li>
65956603
<li>Added the new class <a href="#ShapeClass"><code>sh:ShapeClass</code></a> for implicit class targets, see <a href="https://github.com/w3c/data-shapes/issues/212">Issue 212</a></li>
65966604
<li>Moved SPARQL-based validators from Core to an Appendix of SHACL-SPARQL, see <a href="https://github.com/w3c/data-shapes/issues/271">Issue 271</a></li>

shacl12-vocabularies/shacl.ttl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ sh:deactivated
7171
rdfs:label "deactivated"@en ;
7272
rdfs:comment "If set to true then all nodes conform to this."@en ;
7373
# rdfs:domain sh:Shape or sh:SPARQLConstraint
74-
rdfs:range xsd:boolean ;
74+
# rdfs:range xsd:boolean (node expression)
7575
rdfs:isDefinedBy sh: .
7676

7777
sh:targetClass

0 commit comments

Comments
 (0)