Skip to content

Commit c6047d6

Browse files
committed
clarify multiple shacl list
1 parent f6e8430 commit c6047d6

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

shacl12-core/index.html

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5038,6 +5038,53 @@ <h4>sh:or</h4>
50385038
</div>
50395039
</div>
50405040
</aside>
5041+
5042+
<p>
5043+
Note that all constraints in SHACL get ANDed for execution. Consider the following example:
5044+
</p>
5045+
5046+
<aside class="example">
5047+
<div class="shapes-graph">
5048+
<div class="turtle">
5049+
ex:shapeRoot a sh:NodeShape;
5050+
sh:or
5051+
(ex:shapeA ex:shapeB),
5052+
(ex:shapeC ex:shapeD).
5053+
</div>
5054+
<div class="jsonld">
5055+
<pre class="jsonld">{
5056+
"@id": "ex:shapeRoot",
5057+
"@type": "sh:NodeShape",
5058+
"sh:or": [
5059+
{
5060+
"@list": [
5061+
{
5062+
"@id": "ex:shapeA"
5063+
},
5064+
{
5065+
"@id": "ex:shapeB"
5066+
}
5067+
]
5068+
},
5069+
{
5070+
"@list": [
5071+
{
5072+
"@id": "ex:shapeC"
5073+
},
5074+
{
5075+
"@id": "ex:shapeD"
5076+
}
5077+
]
5078+
}
5079+
]
5080+
}</pre>
5081+
</div>
5082+
</div>
5083+
</aside>
5084+
<p>
5085+
The correct interpretation is (<code>shapeA</code> OR <code>shapeB</code>) AND (<code>shapeC</code> OR <code>shapeD</code>).
5086+
The target nodes need to conform to <code>shapeA</code> or <code>shapeB</code>, and then also <code>shapeC</code> or <code>shapeD</code>.
5087+
</p>
50415088
</section>
50425089

50435090
<section id="XoneConstraintComponent">

0 commit comments

Comments
 (0)