Skip to content

Commit 0cb88b4

Browse files
committed
Apply requested spec edits for sh:nodeByExpression section
1 parent 23d4057 commit 0cb88b4

File tree

1 file changed

+6
-168
lines changed

1 file changed

+6
-168
lines changed

shacl12-core/index.html

Lines changed: 6 additions & 168 deletions
Original file line numberDiff line numberDiff line change
@@ -2822,7 +2822,7 @@ <h3>Conformance Checking</h3>
28222822
has been reported by it.
28232823
</p>
28242824
<p>
2825-
<dfn>Conformance checking</dfn> produces <code>true</code> if and only if a given <a>focus node</a>
2825+
<dfn data-lt="conformance check">Conformance checking</dfn> produces <code>true</code> if and only if a given <a>focus node</a>
28262826
<a>conforms</a> to a given <a>shape</a>, and <code>false</code> otherwise.
28272827
</p>
28282828
<p id="conformance-nested">
@@ -6656,10 +6656,9 @@ <h4>sh:nodeByExpression</h4>
66566656
<div class="def-header">TEXTUAL DEFINITION</div>
66576657
<div class="def-text-body" data-validator="NodeByExpression">
66586658
Let <code>$expr</code> be a <a>value</a> of <code>sh:nodeByExpression</code>.
6659-
For each <a>value node</a> <code>v</code>: perform <a>conformance check</a> of
6659+
For each <a>value node</a> <code>v</code>: perform a <a>conformance check</a> of
66606660
<code>v</code> against each <a>output node</a> of <code>evalExpr(expr,
6661-
<a>data graph</a>, v, {})</code> <code>s</code> that is a <a>node shape</a>
6662-
in the <a>shapes graph</a>. For each <a>conformance check</a>, a <a>failure</a>
6661+
<a>data graph</a>, v, {})</code> <code>s</code>. A <a>failure</a>
66636662
MUST be produced if the <a>conformance check</a> of <code>v</code> against
66646663
<code>s</code> produces a <a>failure</a>. Otherwise, if <code>v</code> does
66656664
not <a>conform</a> to <code>s</code>, there is a <a>validation result</a>
@@ -6678,170 +6677,9 @@ <h4>sh:nodeByExpression</h4>
66786677
as an <a>IRI expression</a> that evaluates to a set containing the same <a>node shape</a>.
66796678
</p>
66806679
<p>
6681-
In the following example, all values of the property <code>ex:address</code> must fulfill the
6682-
constraints expressed by the <a>shape</a> <code>ex:AddressShape</code>.
6680+
For a simple usage example, refer to the example for <a href="#NodeConstraintComponent"><code>sh:node</code></a>,
6681+
but replace `sh:node` with `sh:nodeByExpression`.
66836682
</p>
6684-
<aside class="example">
6685-
<div class="shapes-graph">
6686-
<div class="turtle">
6687-
ex:AddressShape
6688-
a sh:NodeShape ;
6689-
sh:property [
6690-
sh:path ex:postalCode ;
6691-
sh:datatype xsd:string ;
6692-
sh:maxCount 1 ;
6693-
] .
6694-
6695-
ex:PersonShape
6696-
a sh:NodeShape ;
6697-
<span class="target-can-be-skipped">sh:targetClass ex:Person ;</span>
6698-
sh:property [ # _:b1
6699-
sh:path ex:address ;
6700-
sh:minCount 1 ;
6701-
sh:node ex:AddressShape ;
6702-
] .
6703-
</div>
6704-
<div class="jsonld">
6705-
<pre class="jsonld">{
6706-
"@graph": [
6707-
{
6708-
"@id": "ex:AddressShape",
6709-
"@type": "sh:NodeShape",
6710-
"sh:property": {
6711-
"sh:datatype": {
6712-
"@id": "xsd:string"
6713-
},
6714-
"sh:maxCount": {
6715-
"@type": "xsd:integer",
6716-
"@value": "1"
6717-
},
6718-
"sh:path": {
6719-
"@id": "ex:postalCode"
6720-
}
6721-
}
6722-
},
6723-
{
6724-
"@id": "ex:PersonShape",
6725-
"@type": "sh:NodeShape",
6726-
"sh:property": {
6727-
"sh:minCount": {
6728-
"@type": "xsd:integer",
6729-
"@value": "1"
6730-
},
6731-
"sh:node": {
6732-
"@id": "ex:AddressShape"
6733-
},
6734-
"sh:path": {
6735-
"@id": "ex:address"
6736-
}
6737-
},
6738-
"sh:targetClass": {
6739-
"@id": "ex:Person"
6740-
}
6741-
}
6742-
]
6743-
}</pre>
6744-
</div>
6745-
</div>
6746-
<div class="data-graph">
6747-
<div class="turtle">
6748-
ex:Bob a ex:Person ;
6749-
ex:address ex:BobsAddress .
6750-
6751-
ex:BobsAddress
6752-
ex:postalCode "1234" .
6753-
6754-
<span class="focus-node-error">ex:Reto</span> a ex:Person ;
6755-
ex:address ex:RetosAddress .
6756-
6757-
ex:RetosAddress
6758-
ex:postalCode 5678 .
6759-
</div>
6760-
<div class="jsonld">
6761-
<pre class="jsonld">{
6762-
"@graph": [
6763-
{
6764-
"@id": "ex:Bob",
6765-
"@type": "ex:Person",
6766-
"ex:address": {
6767-
"@id": "ex:BobsAddress"
6768-
}
6769-
},
6770-
{
6771-
"@id": "ex:BobsAddress",
6772-
"ex:postalCode": "1234"
6773-
},
6774-
{
6775-
"@id": "ex:Reto",
6776-
"@type": "ex:Person",
6777-
"ex:address": {
6778-
"@id": "ex:RetosAddress"
6779-
}
6780-
},
6781-
{
6782-
"@id": "ex:RetosAddress",
6783-
"ex:postalCode": {
6784-
"@type": "xsd:integer",
6785-
"@value": "5678"
6786-
}
6787-
}
6788-
]
6789-
}</pre>
6790-
</div>
6791-
</div>
6792-
<div class="results-graph">
6793-
<div class="turtle">
6794-
[ a sh:ValidationReport ;
6795-
sh:conforms false ;
6796-
sh:result [
6797-
a sh:ValidationResult ;
6798-
sh:resultSeverity sh:Violation ;
6799-
sh:focusNode ex:Reto ;
6800-
sh:resultPath ex:address ;
6801-
sh:value ex:RetosAddress ;
6802-
sh:resultMessage "Value does not conform to shape ex:AddressShape." ;
6803-
sh:sourceConstraint ex:AddressShape ;
6804-
sh:sourceConstraintComponent sh:NodeByExpressionConstraintComponent ;
6805-
sh:sourceShape _:b1 ;
6806-
]
6807-
] .
6808-
</div>
6809-
<div class="jsonld">
6810-
<pre class="jsonld">{
6811-
"@type": "sh:ValidationReport",
6812-
"sh:conforms": {
6813-
"@type": "xsd:boolean",
6814-
"@value": "false"
6815-
},
6816-
"sh:result": {
6817-
"@type": "sh:ValidationResult",
6818-
"sh:focusNode": {
6819-
"@id": "ex:Reto"
6820-
},
6821-
"sh:resultMessage": "Value does not conform to shape ex:AddressShape.",
6822-
"sh:resultPath": {
6823-
"@id": "ex:address"
6824-
},
6825-
"sh:resultSeverity": {
6826-
"@id": "sh:Violation"
6827-
},
6828-
"sh:sourceConstraint": {
6829-
"@id": "ex:AddressShape"
6830-
},
6831-
"sh:sourceConstraintComponent": {
6832-
"@id": "sh:NodeByExpressionConstraintComponent"
6833-
},
6834-
"sh:sourceShape": {
6835-
"@id": "_:b66_b1"
6836-
},
6837-
"sh:value": {
6838-
"@id": "ex:RetosAddress"
6839-
}
6840-
}
6841-
}</pre>
6842-
</div>
6843-
</div>
6844-
</aside>
68456683
</section>
68466684
</section>
68476685

@@ -7744,8 +7582,8 @@ <h2>Changes between SHACL 1.0 Core and SHACL 1.2 Core</h2>
77447582
<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>
77457583
<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>
77467584
<li>Added the new constraint component <a href="#ExpressionConstraintComponent"><code>sh:expression</code></a>; see <a href="https://github.com/w3c/data-shapes/issues/357">Issue 357</a></li>
7747-
<li>Added the new value <code>sh:ByTypes</code> for <a href="#ClosedConstraintComponent"><code>sh:closed</code></a>; see <a href="https://github.com/w3c/data-shapes/issues/172">Issue 172</a></li>
77487585
<li>Added the new constraint component <a href="#NodeByExpressionConstraintComponent"><code>sh:nodeByExpression</code></a>, see <a href="https://github.com/w3c/data-shapes/issues/408">Issue 408</a></li>
7586+
<li>Added the new value <code>sh:ByTypes</code> for <a href="#ClosedConstraintComponent"><code>sh:closed</code></a>; see <a href="https://github.com/w3c/data-shapes/issues/172">Issue 172</a></li>
77497587
<li>The values of <a href="#ClassConstraintComponent"><code>sh:class</code></a> and <a href="#DatatypeConstraintComponent"><code>sh:datatype</code></a> can now also be lists, indicating a union of choices; see <a href="https://github.com/w3c/data-shapes/issues/160">Issue 160</a></li>
77507588
</ul>
77517589
</section>

0 commit comments

Comments
 (0)