Skip to content

Commit 8a7ec6b

Browse files
committed
Apply requested spec edits for sh:nodeByExpression section
1 parent 8d8086a commit 8a7ec6b

File tree

1 file changed

+3
-165
lines changed

1 file changed

+3
-165
lines changed

shacl12-core/index.html

Lines changed: 3 additions & 165 deletions
Original file line numberDiff line numberDiff line change
@@ -6108,8 +6108,7 @@ <h4>sh:nodeByExpression</h4>
61086108
Let <code>$expr</code> be a <a>value</a> of <code>sh:nodeByExpression</code>.
61096109
For each <a>value node</a> <code>v</code>: perform <a>conformance check</a> of
61106110
<code>v</code> against each <a>output node</a> of <code>evalExpr(expr,
6111-
<a>data graph</a>, v, {})</code> <code>s</code> that is a <a>node shape</a>
6112-
in the <a>shapes graph</a>. For each <a>conformance check</a>, a <a>failure</a>
6111+
<a>data graph</a>, v, {})</code> <code>s</code>. A <a>failure</a>
61136112
MUST be produced if the <a>conformance check</a> of <code>v</code> against
61146113
<code>s</code> produces a <a>failure</a>. Otherwise, if <code>v</code> does
61156114
not <a>conform</a> to <code>s</code>, there is a <a>validation result</a>
@@ -6128,170 +6127,9 @@ <h4>sh:nodeByExpression</h4>
61286127
as an <a>IRI expression</a> that evaluates to a set containing the same <a>node shape</a>.
61296128
</p>
61306129
<p>
6131-
In the following example, all values of the property <code>ex:address</code> must fulfill the
6132-
constraints expressed by the <a>shape</a> <code>ex:AddressShape</code>.
6130+
For a simple usage example, refer to the example for <a href="#NodeConstraintComponent"><code>sh:node</code></a>,
6131+
but replace `sh:node` with `sh:nodeByExpression`.
61336132
</p>
6134-
<aside class="example">
6135-
<div class="shapes-graph">
6136-
<div class="turtle">
6137-
ex:AddressShape
6138-
a sh:NodeShape ;
6139-
sh:property [
6140-
sh:path ex:postalCode ;
6141-
sh:datatype xsd:string ;
6142-
sh:maxCount 1 ;
6143-
] .
6144-
6145-
ex:PersonShape
6146-
a sh:NodeShape ;
6147-
<span class="target-can-be-skipped">sh:targetClass ex:Person ;</span>
6148-
sh:property [ # _:b1
6149-
sh:path ex:address ;
6150-
sh:minCount 1 ;
6151-
sh:node ex:AddressShape ;
6152-
] .
6153-
</div>
6154-
<div class="jsonld">
6155-
<pre class="jsonld">{
6156-
"@graph": [
6157-
{
6158-
"@id": "ex:AddressShape",
6159-
"@type": "sh:NodeShape",
6160-
"sh:property": {
6161-
"sh:datatype": {
6162-
"@id": "xsd:string"
6163-
},
6164-
"sh:maxCount": {
6165-
"@type": "xsd:integer",
6166-
"@value": "1"
6167-
},
6168-
"sh:path": {
6169-
"@id": "ex:postalCode"
6170-
}
6171-
}
6172-
},
6173-
{
6174-
"@id": "ex:PersonShape",
6175-
"@type": "sh:NodeShape",
6176-
"sh:property": {
6177-
"sh:minCount": {
6178-
"@type": "xsd:integer",
6179-
"@value": "1"
6180-
},
6181-
"sh:node": {
6182-
"@id": "ex:AddressShape"
6183-
},
6184-
"sh:path": {
6185-
"@id": "ex:address"
6186-
}
6187-
},
6188-
"sh:targetClass": {
6189-
"@id": "ex:Person"
6190-
}
6191-
}
6192-
]
6193-
}</pre>
6194-
</div>
6195-
</div>
6196-
<div class="data-graph">
6197-
<div class="turtle">
6198-
ex:Bob a ex:Person ;
6199-
ex:address ex:BobsAddress .
6200-
6201-
ex:BobsAddress
6202-
ex:postalCode "1234" .
6203-
6204-
<span class="focus-node-error">ex:Reto</span> a ex:Person ;
6205-
ex:address ex:RetosAddress .
6206-
6207-
ex:RetosAddress
6208-
ex:postalCode 5678 .
6209-
</div>
6210-
<div class="jsonld">
6211-
<pre class="jsonld">{
6212-
"@graph": [
6213-
{
6214-
"@id": "ex:Bob",
6215-
"@type": "ex:Person",
6216-
"ex:address": {
6217-
"@id": "ex:BobsAddress"
6218-
}
6219-
},
6220-
{
6221-
"@id": "ex:BobsAddress",
6222-
"ex:postalCode": "1234"
6223-
},
6224-
{
6225-
"@id": "ex:Reto",
6226-
"@type": "ex:Person",
6227-
"ex:address": {
6228-
"@id": "ex:RetosAddress"
6229-
}
6230-
},
6231-
{
6232-
"@id": "ex:RetosAddress",
6233-
"ex:postalCode": {
6234-
"@type": "xsd:integer",
6235-
"@value": "5678"
6236-
}
6237-
}
6238-
]
6239-
}</pre>
6240-
</div>
6241-
</div>
6242-
<div class="results-graph">
6243-
<div class="turtle">
6244-
[ a sh:ValidationReport ;
6245-
sh:conforms false ;
6246-
sh:result [
6247-
a sh:ValidationResult ;
6248-
sh:resultSeverity sh:Violation ;
6249-
sh:focusNode ex:Reto ;
6250-
sh:resultPath ex:address ;
6251-
sh:value ex:RetosAddress ;
6252-
sh:resultMessage "Value does not conform to shape ex:AddressShape." ;
6253-
sh:sourceConstraint ex:AddressShape ;
6254-
sh:sourceConstraintComponent sh:NodeByExpressionConstraintComponent ;
6255-
sh:sourceShape _:b1 ;
6256-
]
6257-
] .
6258-
</div>
6259-
<div class="jsonld">
6260-
<pre class="jsonld">{
6261-
"@type": "sh:ValidationReport",
6262-
"sh:conforms": {
6263-
"@type": "xsd:boolean",
6264-
"@value": "false"
6265-
},
6266-
"sh:result": {
6267-
"@type": "sh:ValidationResult",
6268-
"sh:focusNode": {
6269-
"@id": "ex:Reto"
6270-
},
6271-
"sh:resultMessage": "Value does not conform to shape ex:AddressShape.",
6272-
"sh:resultPath": {
6273-
"@id": "ex:address"
6274-
},
6275-
"sh:resultSeverity": {
6276-
"@id": "sh:Violation"
6277-
},
6278-
"sh:sourceConstraint": {
6279-
"@id": "ex:AddressShape"
6280-
},
6281-
"sh:sourceConstraintComponent": {
6282-
"@id": "sh:NodeByExpressionConstraintComponent"
6283-
},
6284-
"sh:sourceShape": {
6285-
"@id": "_:b66_b1"
6286-
},
6287-
"sh:value": {
6288-
"@id": "ex:RetosAddress"
6289-
}
6290-
}
6291-
}</pre>
6292-
</div>
6293-
</div>
6294-
</aside>
62956133
</section>
62966134
</section>
62976135

0 commit comments

Comments
 (0)