You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let <code>$memberShape</code> be a <a>parameter value</a> for <code>sh:memberShape</code>.
4557
4557
Each <a>value node</a><code>v</code> must be a <ahref="#syntax-rule-SHACL-list">SHACL list</a> - if <code>v</code> is not a SHACL list there is a <a>validation result</a>.
4558
-
If any member of <code>m</code> of the list <code>v</code> does not <a>conform</a> to <code>$memberShape</code>, there is a <a>validation result</a>. There must be at most one <a>validation result</a> for each list <code>v</code>.
4558
+
If any member <code>m</code> of the list <code>v</code> does not <a>conform</a> to <code>$memberShape</code>, there is a <a>validation result</a>. There must be at most one <a>validation result</a> for each list <code>v</code>.
4559
4559
</div>
4560
4560
</div>
4561
4561
<p><em>The remainder of this section is informative.</em></p>
@@ -4566,6 +4566,9 @@ <h4>sh:memberShape</h4>
4566
4566
<p>
4567
4567
Examples of how to generate <code>sh:detail</code>s in validation results can be found in the test cases for <code>sh:memberShape</code> in the SHACL test suite: <ahref="../shacl12-test-suite/tests/core/node/memberShape-001.ttl">memberShape-001.ttl</a>.
4568
4568
</p>
4569
+
<p>
4570
+
In the following example, all values of the property <code>ex:speakerOrder</code> must be SHACL lists with members that are IRIs.
4571
+
</p>
4569
4572
<asideclass="example">
4570
4573
<divclass="shapes-graph">
4571
4574
<divclass="turtle">
@@ -4577,18 +4580,13 @@ <h4>sh:memberShape</h4>
4577
4580
sh:memberShape [
4578
4581
sh:nodeKind sh:IRI ;
4579
4582
] ;
4580
-
sh:maxCount 1 ;
4581
4583
] .
4582
4584
</div>
4583
4585
<divclass="jsonld">
4584
4586
<preclass="jsonld">{
4585
4587
"@id": "ex:AgendaShape",
4586
4588
"@type": "sh:NodeShape",
4587
4589
"sh:property": {
4588
-
"sh:maxCount": {
4589
-
"@type": "xsd:integer",
4590
-
"@value": "1"
4591
-
},
4592
4590
"sh:memberShape": {
4593
4591
"sh:nodeKind": {
4594
4592
"@id": "sh:IRI"
@@ -4648,48 +4646,6 @@ <h4>sh:memberShape</h4>
4648
4646
}
4649
4647
}
4650
4648
]
4651
-
}</pre>
4652
-
</div>
4653
-
</div>
4654
-
<divclass="validation-report">
4655
-
<divclass="turtle">
4656
-
[] a sh:ValidationReport ;
4657
-
sh:conforms false ;
4658
-
sh:result [
4659
-
a sh:ValidationResult ;
4660
-
sh:focusNode ex:agenda2 ;
4661
-
sh:resultMessage "List member does not have the required node kind sh:IRI." ;
"sh:resultMessage": "List member does not have the required node kind sh:IRI.",
4679
-
"sh:resultPath": {
4680
-
"@id": "ex:speakerOrder"
4681
-
},
4682
-
"sh:resultSeverity": {
4683
-
"@id": "sh:Violation"
4684
-
},
4685
-
"sh:sourceConstraintComponent": {
4686
-
"@id": "sh:MemberShapeConstraintComponent"
4687
-
},
4688
-
"sh:sourceShape": {
4689
-
"@id": "ex:AgendaShape"
4690
-
},
4691
-
"sh:value": "Charlie"
4692
-
}
4693
4649
}</pre>
4694
4650
</div>
4695
4651
</div>
@@ -4729,6 +4685,74 @@ <h4>sh:minListLength</h4>
4729
4685
there is a <a>validation result</a>.
4730
4686
</div>
4731
4687
</div>
4688
+
<p><em>The remainder of this section is informative.</em></p>
4689
+
<p>
4690
+
In the following example, all values of the property <code>ex:skills</code> must be SHACL lists with at least 1 member.
4691
+
Additional test cases for <code>sh:minListLength</code> can be found in the SHACL test suite: <ahref="../shacl12-test-suite/tests/core/node/minListLength-001.ttl">minListLength-001.ttl</a>.
<spanclass="focus-node-error">ex:person2</span> a ex:Person ;
4729
+
ex:skills () .
4730
+
</div>
4731
+
<divclass="jsonld">
4732
+
<preclass="jsonld">{
4733
+
"@graph": [
4734
+
{
4735
+
"@id": "ex:person1",
4736
+
"@type": "ex:Person",
4737
+
"ex:skills": {
4738
+
"@list": [
4739
+
"programming",
4740
+
"design"
4741
+
]
4742
+
}
4743
+
},
4744
+
{
4745
+
"@id": "ex:person2",
4746
+
"@type": "ex:Person",
4747
+
"ex:skills": {
4748
+
"@list": []
4749
+
}
4750
+
}
4751
+
]
4752
+
}</pre>
4753
+
</div>
4754
+
</div>
4755
+
</aside>
4732
4756
</section>
4733
4757
4734
4758
<sectionid="MaxListLengthConstraintComponent">
@@ -4764,6 +4788,78 @@ <h4>sh:maxListLength</h4>
4764
4788
there is a <a>validation result</a>.
4765
4789
</div>
4766
4790
</div>
4791
+
<p><em>The remainder of this section is informative.</em></p>
4792
+
<p>
4793
+
In the following example, all values of the property <code>ex:hobbies</code> must be SHACL lists with at most 2 members.
4794
+
Additional test cases for <code>sh:maxListLength</code> can be found in the SHACL test suite: <ahref="../shacl12-test-suite/tests/core/node/maxListLength-001.ttl">maxListLength-001.ttl</a>.
<spanclass="focus-node-error">ex:person2</span> a ex:Person ;
4832
+
ex:hobbies ( "reading" "writing" "swimming" ) .
4833
+
</div>
4834
+
<divclass="jsonld">
4835
+
<preclass="jsonld">{
4836
+
"@graph": [
4837
+
{
4838
+
"@id": "ex:person1",
4839
+
"@type": "ex:Person",
4840
+
"ex:hobbies": {
4841
+
"@list": [
4842
+
"reading",
4843
+
"writing"
4844
+
]
4845
+
}
4846
+
},
4847
+
{
4848
+
"@id": "ex:person2",
4849
+
"@type": "ex:Person",
4850
+
"ex:hobbies": {
4851
+
"@list": [
4852
+
"reading",
4853
+
"writing",
4854
+
"swimming"
4855
+
]
4856
+
}
4857
+
}
4858
+
]
4859
+
}</pre>
4860
+
</div>
4861
+
</div>
4862
+
</aside>
4767
4863
</section>
4768
4864
4769
4865
<sectionid="UniqueMembersConstraintComponent">
@@ -4800,11 +4896,83 @@ <h4>sh:uniqueMembers</h4>
4800
4896
</div>
4801
4897
<p><em>The remainder of this section is informative.</em></p>
4802
4898
<p>
4803
-
Each duplicate member of a list <code>v</code> should be reported as a separate <code>sh:detail</code> in the <a>validation result</a> for <code>v</code>. If the list <code>v</code> is not a valid <ahref="#syntax-rule-SHACL-list">SHACL list</a>, this should also be reported as a <code>sh:detail</code> in the <a>validation result</a> for <code>v</code>.
4899
+
Each duplicate member <code>m</code>of a list <code>v</code> should be reported as a separate <code>sh:detail</code> in the <a>validation result</a> for <code>v</code>. If the list <code>v</code> is not a valid <ahref="#syntax-rule-SHACL-list">SHACL list</a>, this should also be reported as a <code>sh:detail</code> in the <a>validation result</a> for <code>v</code>.
4804
4900
</p>
4805
4901
<p>
4806
4902
Examples of how to generate <code>sh:detail</code>s in validation results can be found in the test cases for <code>sh:uniqueMembers</code> in the SHACL test suite: <ahref="../shacl12-test-suite/tests/core/node/uniqueMembers-001.ttl">uniqueMembers-001.ttl</a>.
4807
4903
</p>
4904
+
<p>
4905
+
In the following example, all values of the property <code>ex:preferences</code> must be SHACL lists with members that have unique values within each SHACL list.
0 commit comments