.
From 97ecfe6c7f185094583c0e7e71a6a68e02a44a05 Mon Sep 17 00:00:00 2001
From: Jesse Wright <63333554+jeswr@users.noreply.github.com>
Date: Mon, 30 Jun 2025 10:56:09 +0100
Subject: [PATCH 42/53] chore: rename `uniqList` ->` uniqueMembers` in shacl
shacl
---
shacl12-vocabularies/shacl-shacl.ttl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/shacl12-vocabularies/shacl-shacl.ttl b/shacl12-vocabularies/shacl-shacl.ttl
index 1837b08b..67871c82 100644
--- a/shacl12-vocabularies/shacl-shacl.ttl
+++ b/shacl12-vocabularies/shacl-shacl.ttl
@@ -242,7 +242,7 @@ shsh:ShapeShape
sh:minInclusive 0 ; # maxListLength-minInclusive
] ;
sh:property [
- sh:path sh:uniqList ;
+ sh:path sh:uniqueMembers ;
sh:datatype xsd:boolean ; # uniqList-datatype
sh:maxCount 1 ; # uniqList-maxCount
] ;
From 8c6b52b7c54d6ead580e31cf7c6464a82b88c919 Mon Sep 17 00:00:00 2001
From: Jesse Wright <63333554+jeswr@users.noreply.github.com>
Date: Mon, 30 Jun 2025 10:57:05 +0100
Subject: [PATCH 43/53] chore: fix reference to
`UniqueMembersConstraintComponent` in vocab
---
shacl12-vocabularies/shacl.ttl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/shacl12-vocabularies/shacl.ttl b/shacl12-vocabularies/shacl.ttl
index 22860026..c851aa8b 100644
--- a/shacl12-vocabularies/shacl.ttl
+++ b/shacl12-vocabularies/shacl.ttl
@@ -942,7 +942,7 @@ sh:UniqueMembersConstraintComponent
sh:parameter sh:UniqueMembersConstraintComponent-uniqueMembers ;
rdfs:isDefinedBy sh: .
-sh:MemberShapeConstraintComponent-uniqueMembers
+sh:UniqueMembersConstraintComponent-uniqueMembers
a sh:Parameter ;
sh:path sh:uniqueMembers ;
sh:datatype xsd:boolean ;
From 5c72e8eb8a891b008e8c99c54dbdac60407a51ec Mon Sep 17 00:00:00 2001
From: Jesse Wright <63333554+jeswr@users.noreply.github.com>
Date: Mon, 30 Jun 2025 11:07:24 +0100
Subject: [PATCH 44/53] chore: remove blank node targetNodes for lists
---
.../tests/core/node/maxListLength-001.ttl | 10 ++-
.../tests/core/node/memberShape-001.ttl | 89 ++++++++++---------
.../tests/core/node/minListLength-001.ttl | 6 +-
.../tests/core/node/uniqueMembers-001.ttl | 16 ++--
4 files changed, 70 insertions(+), 51 deletions(-)
diff --git a/shacl12-test-suite/tests/core/node/maxListLength-001.ttl b/shacl12-test-suite/tests/core/node/maxListLength-001.ttl
index e5e5438b..43614eac 100644
--- a/shacl12-test-suite/tests/core/node/maxListLength-001.ttl
+++ b/shacl12-test-suite/tests/core/node/maxListLength-001.ttl
@@ -12,12 +12,16 @@ ex:ListShape
rdf:type sh:NodeShape ;
sh:maxListLength 2 ;
# Satisfies all constraints
- sh:targetNode ( 1 2 ), rdf:nil ;
+ sh:targetNode ex:list0, rdf:nil ;
# Violates maxListLength constraint
- sh:targetNode _:b1, ex:notAList ;
+ sh:targetNode ex:list1, ex:notAList ;
.
-_:b1
+ex:list0
+ rdf:first 1 ;
+ rdf:rest ( 2 ) .
+
+ex:list1
rdf:first 1 ;
rdf:rest ( 2 3 ) .
diff --git a/shacl12-test-suite/tests/core/node/memberShape-001.ttl b/shacl12-test-suite/tests/core/node/memberShape-001.ttl
index b2518285..091f8df6 100644
--- a/shacl12-test-suite/tests/core/node/memberShape-001.ttl
+++ b/shacl12-test-suite/tests/core/node/memberShape-001.ttl
@@ -14,57 +14,64 @@ ex:IRIShape a sh:NodeShape ;
ex:IRIListShape
rdf:type sh:NodeShape ;
sh:memberShape ex:IRIShape ;
- sh:targetNode ( ex:Alice ex:Bob ) ;
+ sh:targetNode ex:list0 ;
# Valid empty list
- sh:targetNode () ;
- # _:b1 is valid, the remainder trigger violations (including _:b3 which has no properties in this graph)
- sh:targetNode _:b1, _:b2, _:b3, _:b4, _:b5, _:b6, _:b7, _:b9 ;
+ sh:targetNode rdf:nil ;
+ # ex:list1 is valid, the remainder trigger violations (including ex:list3 which has no properties in this graph)
+ sh:targetNode ex:list1, ex:list2, ex:list3, ex:list4, ex:list5, ex:list6, ex:list7, ex:list9 ;
.
-_:b1
+ex:list0
+ rdf:first ex:Alice ;
+ rdf:rest (
+ ex:Bob
+ ) ;
+.
+
+ex:list1
rdf:first ex:Alice ;
rdf:rest rdf:nil ;
ex:extraProperty "extra" ;
.
-_:b2
+ex:list2
rdf:first ex:Alice ;
rdf:rest (
"Bob"
)
.
-_:b4
+ex:list4
rdf:first ex:Alice ;
.
-_:b5
+ex:list5
rdf:first "Charlie" ;
rdf:rest (
"Donna"
)
.
-_:b6
+ex:list6
rdf:first "Charlie" ;
.
-_:b8 rdfs:label "Malformed SHACL List" .
+ex:list8 rdfs:label "Malformed SHACL List" .
-_:b7
+ex:list7
rdf:first "Charlie" ;
- rdf:rest _:b8 ;
+ rdf:rest ex:list8 ;
.
-# using _:b9 and _:b10 to test recursive list error
-_:b9
+# using ex:list9 and ex:list10 to test recursive list error
+ex:list9
rdf:first ex:Alice ;
- rdf:rest _:b10 ;
+ rdf:rest ex:list10 ;
.
-_:b10
+ex:list10
rdf:first "Bob" ;
- rdf:rest _:b9 .
+ rdf:rest ex:list9 .
<>
rdf:type mf:Manifest ;
@@ -85,7 +92,7 @@ _:b10
sh:conforms "false"^^xsd:boolean ;
sh:result [
rdf:type sh:ValidationResult ;
- sh:focusNode _:b2 ;
+ sh:focusNode ex:list2 ;
sh:resultMessage "Value does not conform to Shape ex:IRIListShape. See details for more information." ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:MemberShapeConstraintComponent ;
@@ -102,43 +109,43 @@ _:b10
] ;
sh:result [
rdf:type sh:ValidationResult ;
- sh:focusNode _:b3 ;
+ sh:focusNode ex:list3 ;
sh:resultMessage "Value is a malformed SHACL List." ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:MemberShapeConstraintComponent ;
sh:sourceShape ex:IRIListShape ;
- sh:value _:b3 ;
+ sh:value ex:list3 ;
sh:detail [
rdf:type sh:ValidationResult ;
- sh:focusNode _:b3 ;
- sh:resultMessage "Value is a malformed SHACL List. _:b3 is missing rdf:first and rdf:rest properties." ;
+ sh:focusNode ex:list3 ;
+ sh:resultMessage "Value is a malformed SHACL List. ex:list3 is missing rdf:first and rdf:rest properties." ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:MemberShapeConstraintComponent ;
sh:sourceShape ex:IRIListShape ;
- sh:value _:b3 ;
+ sh:value ex:list3 ;
] ;
] ;
sh:result [
rdf:type sh:ValidationResult ;
- sh:focusNode _:b4 ;
+ sh:focusNode ex:list4 ;
sh:resultMessage "Value does not conform to Shape ex:IRIListShape. See details for more information." ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:MemberShapeConstraintComponent ;
sh:sourceShape ex:IRIListShape ;
- sh:value _:b4 ;
+ sh:value ex:list4 ;
sh:detail [
rdf:type sh:ValidationResult ;
- sh:focusNode _:b4 ;
- sh:resultMessage "Value is a malformed SHACL List. _:b4 is missing rdf:rest property." ;
+ sh:focusNode ex:list4 ;
+ sh:resultMessage "Value is a malformed SHACL List. ex:list4 is missing rdf:rest property." ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:MemberShapeConstraintComponent ;
sh:sourceShape ex:IRIListShape ;
- sh:value _:b4 ;
+ sh:value ex:list4 ;
] ;
] ;
sh:result [
rdf:type sh:ValidationResult ;
- sh:focusNode _:b5 ;
+ sh:focusNode ex:list5 ;
sh:resultMessage "Value does not conform to Shape ex:IRIListShape. See details for more information." ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:MemberShapeConstraintComponent ;
@@ -163,7 +170,7 @@ _:b10
] ;
sh:result [
rdf:type sh:ValidationResult ;
- sh:focusNode _:b6 ;
+ sh:focusNode ex:list6 ;
sh:resultMessage "Value does not conform to Shape ex:IRIListShape. See details for more information." ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:MemberShapeConstraintComponent ;
@@ -178,17 +185,17 @@ _:b10
sh:value "Charlie" ;
], [
rdf:type sh:ValidationResult ;
- sh:focusNode _:b6 ;
- sh:resultMessage "Value is a malformed SHACL List. _:b6 is missing rdf:rest property." ;
+ sh:focusNode ex:list6 ;
+ sh:resultMessage "Value is a malformed SHACL List. ex:list6 is missing rdf:rest property." ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:MemberShapeConstraintComponent ;
sh:sourceShape ex:IRIListShape ;
- sh:value _:b6 ;
+ sh:value ex:list6 ;
] ;
] ;
sh:result [
rdf:type sh:ValidationResult ;
- sh:focusNode _:b7 ;
+ sh:focusNode ex:list7 ;
sh:resultMessage "Value does not conform to Shape ex:IRIListShape. See details for more information." ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:MemberShapeConstraintComponent ;
@@ -203,17 +210,17 @@ _:b10
sh:value "Charlie" ;
], [
rdf:type sh:ValidationResult ;
- sh:focusNode _:b8 ;
- sh:resultMessage "Value is a malformed SHACL List. _:b8 is missing rdf:first and rdf:rest property." ;
+ sh:focusNode ex:list8 ;
+ sh:resultMessage "Value is a malformed SHACL List. ex:list8 is missing rdf:first and rdf:rest property." ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:MemberShapeConstraintComponent ;
sh:sourceShape ex:IRIListShape ;
- sh:value _:b8 ;
+ sh:value ex:list8 ;
] ;
] ;
sh:result [
rdf:type sh:ValidationResult ;
- sh:focusNode _:b9 ;
+ sh:focusNode ex:list9 ;
sh:resultMessage "Value does not conform to Shape ex:IRIListShape. See details for more information." ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:MemberShapeConstraintComponent ;
@@ -228,12 +235,12 @@ _:b10
sh:value "Charlie" ;
], [
rdf:type sh:ValidationResult ;
- sh:focusNode _:b10 ;
- sh:resultMessage "Value is a malformed SHACL List. A list cannot have itself in the rdf:rest+ path. List _:b9 follows from _:b10." ;
+ sh:focusNode ex:list10 ;
+ sh:resultMessage "Value is a malformed SHACL List. A list cannot have itself in the rdf:rest+ path. List ex:list9 follows from ex:list10." ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:MemberShapeConstraintComponent ;
sh:sourceShape ex:IRIListShape ;
- sh:value _:b9 ;
+ sh:value ex:list9 ;
] ;
] ;
] ;
diff --git a/shacl12-test-suite/tests/core/node/minListLength-001.ttl b/shacl12-test-suite/tests/core/node/minListLength-001.ttl
index 10e2aa1f..8bf4f50a 100644
--- a/shacl12-test-suite/tests/core/node/minListLength-001.ttl
+++ b/shacl12-test-suite/tests/core/node/minListLength-001.ttl
@@ -12,11 +12,15 @@ ex:ListShape
rdf:type sh:NodeShape ;
sh:minListLength 1 ;
# Satisfies all constraints
- sh:targetNode ( 1 2 ) ;
+ sh:targetNode ex:list0 ;
# Violates minListLength constraint
sh:targetNode rdf:nil, ex:notAList ;
.
+ex:list0
+ rdf:first 1 ;
+ rdf:rest ( 2 ) .
+
<>
rdf:type mf:Manifest ;
mf:entries (
diff --git a/shacl12-test-suite/tests/core/node/uniqueMembers-001.ttl b/shacl12-test-suite/tests/core/node/uniqueMembers-001.ttl
index 521d726f..1b136e21 100644
--- a/shacl12-test-suite/tests/core/node/uniqueMembers-001.ttl
+++ b/shacl12-test-suite/tests/core/node/uniqueMembers-001.ttl
@@ -12,12 +12,16 @@ ex:ListShape
rdf:type sh:NodeShape ;
sh:uniqueMembers true ;
# Satisfies all constraints
- sh:targetNode ( 1 2 ), rdf:nil ;
+ sh:targetNode ex:list0, rdf:nil ;
# Violates uniqueMembers constraint
- sh:targetNode _:b1, ex:notAList ;
+ sh:targetNode ex:list1, ex:notAList ;
.
-_:b1
+ex:list0
+ rdf:first 1 ;
+ rdf:rest ( 2 ) .
+
+ex:list1
rdf:first 1 ;
rdf:rest ( 2 1 2 2 ) .
@@ -40,14 +44,14 @@ _:b1
sh:conforms "false"^^xsd:boolean ;
sh:result [
rdf:type sh:ValidationResult ;
- sh:focusNode _:b1 ;
+ sh:focusNode ex:list1 ;
sh:resultMessage "Value does not conform to Shape ex:ListShape. See details for more information." ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:UniqueMembersConstraintComponent ;
sh:sourceShape ex:ListShape ;
sh:detail [
rdf:type sh:ValidationResult ;
- sh:focusNode _:b1 ;
+ sh:focusNode ex:list1 ;
sh:resultMessage "List is required to have unique elements. Two occurences of '\"1\"^^xsd:integer' found." ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:UniqueMembersConstraintComponent ;
@@ -55,7 +59,7 @@ _:b1
sh:value 1 ;
], [
rdf:type sh:ValidationResult ;
- sh:focusNode _:b1 ;
+ sh:focusNode ex:list1 ;
sh:resultMessage "List is required to have unique elements. Three occurences of '\"2\"^^xsd:integer' found." ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:UniqueMembersConstraintComponent ;
From ca91c2c71ce6526995d39a5ba2eca744ba2d9d39 Mon Sep 17 00:00:00 2001
From: Jesse Wright <63333554+jeswr@users.noreply.github.com>
Date: Mon, 30 Jun 2025 11:23:31 +0100
Subject: [PATCH 45/53] fix: make invalid SHACL lists a top-level violation
---
shacl12-core/index.html | 8 +-
.../tests/core/node/memberShape-001.ttl | 82 ++-----------------
.../tests/core/node/uniqueMembers-001.ttl | 11 +--
.../tests/core/property/uniqueMembers-001.ttl | 12 +--
4 files changed, 14 insertions(+), 99 deletions(-)
diff --git a/shacl12-core/index.html b/shacl12-core/index.html
index 1e4f0063..5b7de87b 100644
--- a/shacl12-core/index.html
+++ b/shacl12-core/index.html
@@ -4555,13 +4555,13 @@ sh:memberShape
Let
$memberShape
be a
parameter value for
sh:memberShape
.
Each
value node v
must be a
SHACL list - if
v
is not a SHACL list there is a
validation result.
- If any member
m
of the list
v
does not
conform to
$memberShape
, there is a
validation result. There must be at most one
validation result for each list
v
.
+ If any member
m
of the
SHACL list v
does not
conform to
$memberShape
, there is a
validation result.
The remainder of this section is informative.
Each member m
of a value node v
that does not conform to the $memberShape
should be reported as a separate sh:detail
in the validation result for v
.
- If the list v
is not a valid SHACL list, this should also be reported as a sh:detail
in the validation result for v
.
+ If v
is not a valid SHACL list, this should be reported as a top-level validation result and validation of individual members should not be attempted.
Examples of how to generate sh:detail
s in validation results can be found in the test cases for sh:memberShape
in the SHACL test suite: memberShape-001.ttl.
@@ -4891,12 +4891,12 @@
sh:uniqueMembers
Let $uniqueMembers
be a parameter value for sh:uniqueMembers
.
Each value node v
must be a SHACL list - if v
is not a SHACL list there is a validation result.
If $uniqueMembers
is true
and the list v
has duplicate members,
- there is a validation result. There must be at most one validation result for each list v
.
+ there is a validation result.
The remainder of this section is informative.
- Each duplicate member m
of a list v
should be reported as a separate sh:detail
in the validation result for v
. If the list v
is not a valid SHACL list, this should also be reported as a sh:detail
in the validation result for v
.
+ Each duplicate member m
of a list v
should be reported as a separate sh:detail
in the validation result for v
. If the list v
is not a valid SHACL list, this should be reported as a top-level validation result and validation of unique membership should not be attempted.
Examples of how to generate sh:detail
s in validation results can be found in the test cases for sh:uniqueMembers
in the SHACL test suite: uniqueMembers-001.ttl.
diff --git a/shacl12-test-suite/tests/core/node/memberShape-001.ttl b/shacl12-test-suite/tests/core/node/memberShape-001.ttl
index 091f8df6..b4d9ed39 100644
--- a/shacl12-test-suite/tests/core/node/memberShape-001.ttl
+++ b/shacl12-test-suite/tests/core/node/memberShape-001.ttl
@@ -110,38 +110,20 @@ ex:list10
sh:result [
rdf:type sh:ValidationResult ;
sh:focusNode ex:list3 ;
- sh:resultMessage "Value is a malformed SHACL List." ;
+ sh:resultMessage "Value is a malformed SHACL List. ex:list3 is missing rdf:first and rdf:rest properties." ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:MemberShapeConstraintComponent ;
sh:sourceShape ex:IRIListShape ;
sh:value ex:list3 ;
- sh:detail [
- rdf:type sh:ValidationResult ;
- sh:focusNode ex:list3 ;
- sh:resultMessage "Value is a malformed SHACL List. ex:list3 is missing rdf:first and rdf:rest properties." ;
- sh:resultSeverity sh:Violation ;
- sh:sourceConstraintComponent sh:MemberShapeConstraintComponent ;
- sh:sourceShape ex:IRIListShape ;
- sh:value ex:list3 ;
- ] ;
] ;
sh:result [
rdf:type sh:ValidationResult ;
sh:focusNode ex:list4 ;
- sh:resultMessage "Value does not conform to Shape ex:IRIListShape. See details for more information." ;
+ sh:resultMessage "Value is a malformed SHACL List. ex:list4 is missing rdf:rest property." ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:MemberShapeConstraintComponent ;
sh:sourceShape ex:IRIListShape ;
sh:value ex:list4 ;
- sh:detail [
- rdf:type sh:ValidationResult ;
- sh:focusNode ex:list4 ;
- sh:resultMessage "Value is a malformed SHACL List. ex:list4 is missing rdf:rest property." ;
- sh:resultSeverity sh:Violation ;
- sh:sourceConstraintComponent sh:MemberShapeConstraintComponent ;
- sh:sourceShape ex:IRIListShape ;
- sh:value ex:list4 ;
- ] ;
] ;
sh:result [
rdf:type sh:ValidationResult ;
@@ -171,77 +153,29 @@ ex:list10
sh:result [
rdf:type sh:ValidationResult ;
sh:focusNode ex:list6 ;
- sh:resultMessage "Value does not conform to Shape ex:IRIListShape. See details for more information." ;
+ sh:resultMessage "Value is a malformed SHACL List. ex:list6 is missing rdf:rest property." ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:MemberShapeConstraintComponent ;
sh:sourceShape ex:IRIListShape ;
- sh:detail [
- rdf:type sh:ValidationResult ;
- sh:focusNode "Charlie" ;
- sh:resultMessage "Value is not of Node Kind sh:IRI" ;
- sh:resultSeverity sh:Violation ;
- sh:sourceConstraintComponent sh:NodeKindConstraintComponent ;
- sh:sourceShape ex:IRIShape ;
- sh:value "Charlie" ;
- ], [
- rdf:type sh:ValidationResult ;
- sh:focusNode ex:list6 ;
- sh:resultMessage "Value is a malformed SHACL List. ex:list6 is missing rdf:rest property." ;
- sh:resultSeverity sh:Violation ;
- sh:sourceConstraintComponent sh:MemberShapeConstraintComponent ;
- sh:sourceShape ex:IRIListShape ;
- sh:value ex:list6 ;
- ] ;
+ sh:value ex:list6 ;
] ;
sh:result [
rdf:type sh:ValidationResult ;
sh:focusNode ex:list7 ;
- sh:resultMessage "Value does not conform to Shape ex:IRIListShape. See details for more information." ;
+ sh:resultMessage "Value is a malformed SHACL List. ex:list8 is missing rdf:first and rdf:rest property." ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:MemberShapeConstraintComponent ;
sh:sourceShape ex:IRIListShape ;
- sh:detail [
- rdf:type sh:ValidationResult ;
- sh:focusNode "Charlie" ;
- sh:resultMessage "Value is not of Node Kind sh:IRI" ;
- sh:resultSeverity sh:Violation ;
- sh:sourceConstraintComponent sh:NodeKindConstraintComponent ;
- sh:sourceShape ex:IRIShape ;
- sh:value "Charlie" ;
- ], [
- rdf:type sh:ValidationResult ;
- sh:focusNode ex:list8 ;
- sh:resultMessage "Value is a malformed SHACL List. ex:list8 is missing rdf:first and rdf:rest property." ;
- sh:resultSeverity sh:Violation ;
- sh:sourceConstraintComponent sh:MemberShapeConstraintComponent ;
- sh:sourceShape ex:IRIListShape ;
- sh:value ex:list8 ;
- ] ;
+ sh:value ex:list8 ;
] ;
sh:result [
rdf:type sh:ValidationResult ;
sh:focusNode ex:list9 ;
- sh:resultMessage "Value does not conform to Shape ex:IRIListShape. See details for more information." ;
+ sh:resultMessage "Value is a malformed SHACL List. A list cannot have itself in the rdf:rest+ path. List ex:list9 follows from ex:list10." ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:MemberShapeConstraintComponent ;
sh:sourceShape ex:IRIListShape ;
- sh:detail [
- rdf:type sh:ValidationResult ;
- sh:focusNode "Charlie" ;
- sh:resultMessage "Value is not of Node Kind sh:IRI" ;
- sh:resultSeverity sh:Violation ;
- sh:sourceConstraintComponent sh:NodeKindConstraintComponent ;
- sh:sourceShape ex:IRIShape ;
- sh:value "Charlie" ;
- ], [
- rdf:type sh:ValidationResult ;
- sh:focusNode ex:list10 ;
- sh:resultMessage "Value is a malformed SHACL List. A list cannot have itself in the rdf:rest+ path. List ex:list9 follows from ex:list10." ;
- sh:resultSeverity sh:Violation ;
- sh:sourceConstraintComponent sh:MemberShapeConstraintComponent ;
- sh:sourceShape ex:IRIListShape ;
- sh:value ex:list9 ;
- ] ;
+ sh:value ex:list10 ;
] ;
] ;
mf:status sht:approved ;
diff --git a/shacl12-test-suite/tests/core/node/uniqueMembers-001.ttl b/shacl12-test-suite/tests/core/node/uniqueMembers-001.ttl
index 1b136e21..f292d344 100644
--- a/shacl12-test-suite/tests/core/node/uniqueMembers-001.ttl
+++ b/shacl12-test-suite/tests/core/node/uniqueMembers-001.ttl
@@ -70,20 +70,11 @@ ex:list1
sh:result [
rdf:type sh:ValidationResult ;
sh:focusNode ex:notAList ;
- sh:resultMessage "Value does not conform to Shape ex:ListShape. See details for more information." ;
+ sh:resultMessage "Value is a malformed SHACL List. ex:notAList is missing rdf:first and rdf:rest properties." ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:UniqueMembersConstraintComponent ;
sh:sourceShape ex:ListShape ;
sh:value ex:notAList ;
- sh:detail [
- rdf:type sh:ValidationResult ;
- sh:focusNode ex:notAList ;
- sh:resultMessage "Value is a malformed SHACL List. ex:notAList is missing rdf:first and rdf:rest properties." ;
- sh:resultSeverity sh:Violation ;
- sh:sourceConstraintComponent sh:UniqueMembersConstraintComponent ;
- sh:sourceShape ex:ListShape ;
- sh:value ex:notAList ;
- ]
] ;
] ;
mf:status sht:approved ;
diff --git a/shacl12-test-suite/tests/core/property/uniqueMembers-001.ttl b/shacl12-test-suite/tests/core/property/uniqueMembers-001.ttl
index a4230405..aadc19d0 100644
--- a/shacl12-test-suite/tests/core/property/uniqueMembers-001.ttl
+++ b/shacl12-test-suite/tests/core/property/uniqueMembers-001.ttl
@@ -92,22 +92,12 @@ _:b1
sh:result [
rdf:type sh:ValidationResult ;
sh:focusNode ex:person4 ;
- sh:resultMessage "Value does not conform to Shape ex:PersonShape. See details for more information." ;
+ sh:resultMessage "Value is a malformed SHACL List. ex:notAList is missing rdf:first and rdf:rest properties." ;
sh:resultPath ex:preferences ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:UniqueMembersConstraintComponent ;
sh:sourceShape ex:PersonShape ;
sh:value ex:notAList ;
- sh:detail [
- rdf:type sh:ValidationResult ;
- sh:focusNode ex:person4 ;
- sh:resultMessage "Value is a malformed SHACL List. ex:notAList is missing rdf:first and rdf:rest properties." ;
- sh:resultPath ex:preferences ;
- sh:resultSeverity sh:Violation ;
- sh:sourceConstraintComponent sh:UniqueMembersConstraintComponent ;
- sh:sourceShape ex:PersonShape ;
- sh:value ex:notAList ;
- ]
] ;
] ;
mf:status sht:approved ;
From 1c17cb034c0650d3e4faa659bc658892221757d6 Mon Sep 17 00:00:00 2001
From: Jesse Wright <63333554+jeswr@users.noreply.github.com>
Date: Mon, 30 Jun 2025 14:03:38 +0100
Subject: [PATCH 46/53] fix: Use correct focusNode and value for maxListLength
test
---
shacl12-test-suite/tests/core/node/maxListLength-001.ttl | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/shacl12-test-suite/tests/core/node/maxListLength-001.ttl b/shacl12-test-suite/tests/core/node/maxListLength-001.ttl
index 43614eac..3ce778b7 100644
--- a/shacl12-test-suite/tests/core/node/maxListLength-001.ttl
+++ b/shacl12-test-suite/tests/core/node/maxListLength-001.ttl
@@ -44,11 +44,12 @@ ex:list1
sh:conforms "false"^^xsd:boolean ;
sh:result [
rdf:type sh:ValidationResult ;
- sh:focusNode rdf:nil ;
+ sh:focusNode ex:list1 ;
sh:resultMessage "List has length 3, but maximum allowed length is 2." ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:MaxListLengthConstraintComponent ;
sh:sourceShape ex:ListShape ;
+ sh:value ex:list1 ;
] ;
sh:result [
rdf:type sh:ValidationResult ;
From 54f1500d267125518e57b47db13a3287ab1265e9 Mon Sep 17 00:00:00 2001
From: Jesse Wright <63333554+jeswr@users.noreply.github.com>
Date: Mon, 30 Jun 2025 14:05:30 +0100
Subject: [PATCH 47/53] fix: remove unnecessary maxCount and fix maxListLength
name error in vocab
---
shacl12-vocabularies/shacl.ttl | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/shacl12-vocabularies/shacl.ttl b/shacl12-vocabularies/shacl.ttl
index c851aa8b..4223b768 100644
--- a/shacl12-vocabularies/shacl.ttl
+++ b/shacl12-vocabularies/shacl.ttl
@@ -918,21 +918,19 @@ sh:MinListLengthConstraintComponent-minListLength
a sh:Parameter ;
sh:path sh:minListLength ;
sh:datatype xsd:integer ;
- sh:maxCount 1 ;
rdfs:isDefinedBy sh: .
sh:MaxListLengthConstraintComponent
a sh:ConstraintComponent ;
rdfs:label "Maximum list length constraint component"@en ;
rdfs:comment "Specifies the maximum length of a SHACL list. A violation is reported if the value is not a valid SHACL list."@en ;
- sh:parameter sh:MaxListLengthConstraintComponent-minListLength ;
+ sh:parameter sh:MaxListLengthConstraintComponent-maxListLength ;
rdfs:isDefinedBy sh: .
sh:MaxListLengthConstraintComponent-maxListLength
a sh:Parameter ;
sh:path sh:maxListLength ;
sh:datatype xsd:integer ;
- sh:maxCount 1 ;
rdfs:isDefinedBy sh: .
sh:UniqueMembersConstraintComponent
@@ -946,7 +944,6 @@ sh:UniqueMembersConstraintComponent-uniqueMembers
a sh:Parameter ;
sh:path sh:uniqueMembers ;
sh:datatype xsd:boolean ;
- sh:maxCount 1 ;
rdfs:isDefinedBy sh: .
sh:memberShape
From 91bf091e071fedccab4de57b8273344a20cb97b9 Mon Sep 17 00:00:00 2001
From: Jesse Wright <63333554+jeswr@users.noreply.github.com>
Date: Mon, 30 Jun 2025 14:47:07 +0100
Subject: [PATCH 48/53] chore: remove result messages from tests
---
.../tests/core/node/maxListLength-001.ttl | 2 --
shacl12-test-suite/tests/core/node/memberShape-001.ttl | 10 ----------
.../tests/core/node/minListLength-001.ttl | 2 --
.../tests/core/node/uniqueMembers-001.ttl | 4 ----
.../tests/core/property/maxListLength-001.ttl | 2 --
.../tests/core/property/memberShape-001.ttl | 2 --
.../tests/core/property/minListLength-001.ttl | 2 --
.../tests/core/property/uniqueMembers-001.ttl | 4 ----
8 files changed, 28 deletions(-)
diff --git a/shacl12-test-suite/tests/core/node/maxListLength-001.ttl b/shacl12-test-suite/tests/core/node/maxListLength-001.ttl
index 3ce778b7..5e412494 100644
--- a/shacl12-test-suite/tests/core/node/maxListLength-001.ttl
+++ b/shacl12-test-suite/tests/core/node/maxListLength-001.ttl
@@ -45,7 +45,6 @@ ex:list1
sh:result [
rdf:type sh:ValidationResult ;
sh:focusNode ex:list1 ;
- sh:resultMessage "List has length 3, but maximum allowed length is 2." ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:MaxListLengthConstraintComponent ;
sh:sourceShape ex:ListShape ;
@@ -54,7 +53,6 @@ ex:list1
sh:result [
rdf:type sh:ValidationResult ;
sh:focusNode ex:notAList ;
- sh:resultMessage "Value is a malformed SHACL List. ex:notAList is missing rdf:first and rdf:rest properties." ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:MaxListLengthConstraintComponent ;
sh:sourceShape ex:ListShape ;
diff --git a/shacl12-test-suite/tests/core/node/memberShape-001.ttl b/shacl12-test-suite/tests/core/node/memberShape-001.ttl
index b4d9ed39..9dde67e2 100644
--- a/shacl12-test-suite/tests/core/node/memberShape-001.ttl
+++ b/shacl12-test-suite/tests/core/node/memberShape-001.ttl
@@ -93,14 +93,12 @@ ex:list10
sh:result [
rdf:type sh:ValidationResult ;
sh:focusNode ex:list2 ;
- sh:resultMessage "Value does not conform to Shape ex:IRIListShape. See details for more information." ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:MemberShapeConstraintComponent ;
sh:sourceShape ex:IRIListShape ;
sh:detail [
rdf:type sh:ValidationResult ;
sh:focusNode "Bob" ;
- sh:resultMessage "Value is not of Node Kind sh:IRI" ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:NodeKindConstraintComponent ;
sh:sourceShape ex:IRIShape ;
@@ -110,7 +108,6 @@ ex:list10
sh:result [
rdf:type sh:ValidationResult ;
sh:focusNode ex:list3 ;
- sh:resultMessage "Value is a malformed SHACL List. ex:list3 is missing rdf:first and rdf:rest properties." ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:MemberShapeConstraintComponent ;
sh:sourceShape ex:IRIListShape ;
@@ -119,7 +116,6 @@ ex:list10
sh:result [
rdf:type sh:ValidationResult ;
sh:focusNode ex:list4 ;
- sh:resultMessage "Value is a malformed SHACL List. ex:list4 is missing rdf:rest property." ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:MemberShapeConstraintComponent ;
sh:sourceShape ex:IRIListShape ;
@@ -128,14 +124,12 @@ ex:list10
sh:result [
rdf:type sh:ValidationResult ;
sh:focusNode ex:list5 ;
- sh:resultMessage "Value does not conform to Shape ex:IRIListShape. See details for more information." ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:MemberShapeConstraintComponent ;
sh:sourceShape ex:IRIListShape ;
sh:detail [
rdf:type sh:ValidationResult ;
sh:focusNode "Charlie" ;
- sh:resultMessage "Value is not of Node Kind sh:IRI" ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:NodeKindConstraintComponent ;
sh:sourceShape ex:IRIShape ;
@@ -143,7 +137,6 @@ ex:list10
], [
rdf:type sh:ValidationResult ;
sh:focusNode "Donna" ;
- sh:resultMessage "Value is not of Node Kind sh:IRI" ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:NodeKindConstraintComponent ;
sh:sourceShape ex:IRIShape ;
@@ -153,7 +146,6 @@ ex:list10
sh:result [
rdf:type sh:ValidationResult ;
sh:focusNode ex:list6 ;
- sh:resultMessage "Value is a malformed SHACL List. ex:list6 is missing rdf:rest property." ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:MemberShapeConstraintComponent ;
sh:sourceShape ex:IRIListShape ;
@@ -162,7 +154,6 @@ ex:list10
sh:result [
rdf:type sh:ValidationResult ;
sh:focusNode ex:list7 ;
- sh:resultMessage "Value is a malformed SHACL List. ex:list8 is missing rdf:first and rdf:rest property." ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:MemberShapeConstraintComponent ;
sh:sourceShape ex:IRIListShape ;
@@ -171,7 +162,6 @@ ex:list10
sh:result [
rdf:type sh:ValidationResult ;
sh:focusNode ex:list9 ;
- sh:resultMessage "Value is a malformed SHACL List. A list cannot have itself in the rdf:rest+ path. List ex:list9 follows from ex:list10." ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:MemberShapeConstraintComponent ;
sh:sourceShape ex:IRIListShape ;
diff --git a/shacl12-test-suite/tests/core/node/minListLength-001.ttl b/shacl12-test-suite/tests/core/node/minListLength-001.ttl
index 8bf4f50a..118a7ec0 100644
--- a/shacl12-test-suite/tests/core/node/minListLength-001.ttl
+++ b/shacl12-test-suite/tests/core/node/minListLength-001.ttl
@@ -41,7 +41,6 @@ ex:list0
sh:result [
rdf:type sh:ValidationResult ;
sh:focusNode rdf:nil ;
- sh:resultMessage "List has length 0, but minimum required length is 1." ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:MinListLengthConstraintComponent ;
sh:sourceShape ex:ListShape ;
@@ -49,7 +48,6 @@ ex:list0
sh:result [
rdf:type sh:ValidationResult ;
sh:focusNode ex:notAList ;
- sh:resultMessage "Value is a malformed SHACL List. ex:notAList is missing rdf:first and rdf:rest properties." ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:MinListLengthConstraintComponent ;
sh:sourceShape ex:ListShape ;
diff --git a/shacl12-test-suite/tests/core/node/uniqueMembers-001.ttl b/shacl12-test-suite/tests/core/node/uniqueMembers-001.ttl
index f292d344..287e9137 100644
--- a/shacl12-test-suite/tests/core/node/uniqueMembers-001.ttl
+++ b/shacl12-test-suite/tests/core/node/uniqueMembers-001.ttl
@@ -45,14 +45,12 @@ ex:list1
sh:result [
rdf:type sh:ValidationResult ;
sh:focusNode ex:list1 ;
- sh:resultMessage "Value does not conform to Shape ex:ListShape. See details for more information." ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:UniqueMembersConstraintComponent ;
sh:sourceShape ex:ListShape ;
sh:detail [
rdf:type sh:ValidationResult ;
sh:focusNode ex:list1 ;
- sh:resultMessage "List is required to have unique elements. Two occurences of '\"1\"^^xsd:integer' found." ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:UniqueMembersConstraintComponent ;
sh:sourceShape ex:ListShape ;
@@ -60,7 +58,6 @@ ex:list1
], [
rdf:type sh:ValidationResult ;
sh:focusNode ex:list1 ;
- sh:resultMessage "List is required to have unique elements. Three occurences of '\"2\"^^xsd:integer' found." ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:UniqueMembersConstraintComponent ;
sh:sourceShape ex:ListShape ;
@@ -70,7 +67,6 @@ ex:list1
sh:result [
rdf:type sh:ValidationResult ;
sh:focusNode ex:notAList ;
- sh:resultMessage "Value is a malformed SHACL List. ex:notAList is missing rdf:first and rdf:rest properties." ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:UniqueMembersConstraintComponent ;
sh:sourceShape ex:ListShape ;
diff --git a/shacl12-test-suite/tests/core/property/maxListLength-001.ttl b/shacl12-test-suite/tests/core/property/maxListLength-001.ttl
index 709e9e27..a9bebf95 100644
--- a/shacl12-test-suite/tests/core/property/maxListLength-001.ttl
+++ b/shacl12-test-suite/tests/core/property/maxListLength-001.ttl
@@ -63,7 +63,6 @@ _:b1
sh:result [
rdf:type sh:ValidationResult ;
sh:focusNode ex:person3 ;
- sh:resultMessage "List has length 3, but maximum allowed length is 2." ;
sh:resultPath ex:hobbies ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:MaxListLengthConstraintComponent ;
@@ -73,7 +72,6 @@ _:b1
sh:result [
rdf:type sh:ValidationResult ;
sh:focusNode ex:person4 ;
- sh:resultMessage "Value is a malformed SHACL List. ex:notAList is missing rdf:first and rdf:rest properties." ;
sh:resultPath ex:hobbies ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:MaxListLengthConstraintComponent ;
diff --git a/shacl12-test-suite/tests/core/property/memberShape-001.ttl b/shacl12-test-suite/tests/core/property/memberShape-001.ttl
index 40bc2c7b..223420fb 100644
--- a/shacl12-test-suite/tests/core/property/memberShape-001.ttl
+++ b/shacl12-test-suite/tests/core/property/memberShape-001.ttl
@@ -68,7 +68,6 @@ _:b1
sh:result [
rdf:type sh:ValidationResult ;
sh:focusNode ex:list2 ;
- sh:resultMessage "Value does not conform to Shape ex:TestShape. See details for more information." ;
sh:resultPath ex:testProperty ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:MemberShapeConstraintComponent ;
@@ -77,7 +76,6 @@ _:b1
sh:detail [
rdf:type sh:ValidationResult ;
sh:focusNode _:bc ;
- sh:resultMessage "Value is not of Node Kind sh:IRI" ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:NodeKindConstraintComponent ;
sh:sourceShape ex:IRIShape ;
diff --git a/shacl12-test-suite/tests/core/property/minListLength-001.ttl b/shacl12-test-suite/tests/core/property/minListLength-001.ttl
index 2a7c91ac..8e771917 100644
--- a/shacl12-test-suite/tests/core/property/minListLength-001.ttl
+++ b/shacl12-test-suite/tests/core/property/minListLength-001.ttl
@@ -54,7 +54,6 @@ ex:person3
sh:result [
rdf:type sh:ValidationResult ;
sh:focusNode ex:person2 ;
- sh:resultMessage "List has length 0, but minimum required length is 1." ;
sh:resultPath ex:skills ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:MinListLengthConstraintComponent ;
@@ -64,7 +63,6 @@ ex:person3
sh:result [
rdf:type sh:ValidationResult ;
sh:focusNode ex:person3 ;
- sh:resultMessage "Value is a malformed SHACL List. ex:notAList is missing rdf:first and rdf:rest properties." ;
sh:resultPath ex:skills ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:MinListLengthConstraintComponent ;
diff --git a/shacl12-test-suite/tests/core/property/uniqueMembers-001.ttl b/shacl12-test-suite/tests/core/property/uniqueMembers-001.ttl
index aadc19d0..d1e58e29 100644
--- a/shacl12-test-suite/tests/core/property/uniqueMembers-001.ttl
+++ b/shacl12-test-suite/tests/core/property/uniqueMembers-001.ttl
@@ -63,7 +63,6 @@ _:b1
sh:result [
rdf:type sh:ValidationResult ;
sh:focusNode ex:person3 ;
- sh:resultMessage "Value does not conform to Shape ex:PersonShape. See details for more information." ;
sh:resultPath ex:preferences ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:UniqueMembersConstraintComponent ;
@@ -72,7 +71,6 @@ _:b1
sh:detail [
rdf:type sh:ValidationResult ;
sh:focusNode ex:person3 ;
- sh:resultMessage "List is required to have unique elements. Two occurences of '\"coffee\"' found." ;
sh:resultPath ex:preferences ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:UniqueMembersConstraintComponent ;
@@ -81,7 +79,6 @@ _:b1
], [
rdf:type sh:ValidationResult ;
sh:focusNode ex:person3 ;
- sh:resultMessage "List is required to have unique elements. Three occurences of '\"tea\"' found." ;
sh:resultPath ex:preferences ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:UniqueMembersConstraintComponent ;
@@ -92,7 +89,6 @@ _:b1
sh:result [
rdf:type sh:ValidationResult ;
sh:focusNode ex:person4 ;
- sh:resultMessage "Value is a malformed SHACL List. ex:notAList is missing rdf:first and rdf:rest properties." ;
sh:resultPath ex:preferences ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:UniqueMembersConstraintComponent ;
From 99ca14f632dba3ca9f623d708864dd8071f375b3 Mon Sep 17 00:00:00 2001
From: Jesse Wright <63333554+jeswr@users.noreply.github.com>
Date: Mon, 30 Jun 2025 15:02:45 +0100
Subject: [PATCH 49/53] chore: make sourceShape a property shape where
applicable
---
.../tests/core/property/maxListLength-001.ttl | 15 ++++++++------
.../tests/core/property/memberShape-001.ttl | 2 +-
.../tests/core/property/minListLength-001.ttl | 10 ++++++++--
.../tests/core/property/uniqueMembers-001.ttl | 20 +++++++++++--------
4 files changed, 30 insertions(+), 17 deletions(-)
diff --git a/shacl12-test-suite/tests/core/property/maxListLength-001.ttl b/shacl12-test-suite/tests/core/property/maxListLength-001.ttl
index a9bebf95..6b98001b 100644
--- a/shacl12-test-suite/tests/core/property/maxListLength-001.ttl
+++ b/shacl12-test-suite/tests/core/property/maxListLength-001.ttl
@@ -11,10 +11,13 @@
ex:PersonShape
rdf:type sh:NodeShape ;
sh:targetClass ex:Person ;
- sh:property [
- sh:path ex:hobbies ;
- sh:maxListLength 2 ;
- ] ;
+ sh:property ex:PersonShape-hobbies ;
+.
+
+ex:PersonShape-hobbies
+ rdf:type sh:PropertyShape ;
+ sh:path ex:hobbies ;
+ sh:maxListLength 2 ;
.
# Satisfies all constraints
@@ -66,7 +69,7 @@ _:b1
sh:resultPath ex:hobbies ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:MaxListLengthConstraintComponent ;
- sh:sourceShape ex:PersonShape ;
+ sh:sourceShape ex:PersonShape-hobbies ;
sh:value _:b1 ;
] ;
sh:result [
@@ -75,7 +78,7 @@ _:b1
sh:resultPath ex:hobbies ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:MaxListLengthConstraintComponent ;
- sh:sourceShape ex:PersonShape ;
+ sh:sourceShape ex:PersonShape-hobbies ;
sh:value ex:notAList ;
] ;
] ;
diff --git a/shacl12-test-suite/tests/core/property/memberShape-001.ttl b/shacl12-test-suite/tests/core/property/memberShape-001.ttl
index 223420fb..f525f1ec 100644
--- a/shacl12-test-suite/tests/core/property/memberShape-001.ttl
+++ b/shacl12-test-suite/tests/core/property/memberShape-001.ttl
@@ -71,7 +71,7 @@ _:b1
sh:resultPath ex:testProperty ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:MemberShapeConstraintComponent ;
- sh:sourceShape ex:TestShape ;
+ sh:sourceShape ex:TestShape-testProperty ;
sh:value _:b1 ;
sh:detail [
rdf:type sh:ValidationResult ;
diff --git a/shacl12-test-suite/tests/core/property/minListLength-001.ttl b/shacl12-test-suite/tests/core/property/minListLength-001.ttl
index 8e771917..ebe5bf8a 100644
--- a/shacl12-test-suite/tests/core/property/minListLength-001.ttl
+++ b/shacl12-test-suite/tests/core/property/minListLength-001.ttl
@@ -17,6 +17,12 @@ ex:PersonShape
] ;
.
+ex:PersonShape-skills
+ rdf:type sh:PropertyShape ;
+ sh:path ex:skills ;
+ sh:minListLength 1 ;
+.
+
# Satisfies all constraints
ex:person1
rdf:type ex:Person ;
@@ -57,7 +63,7 @@ ex:person3
sh:resultPath ex:skills ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:MinListLengthConstraintComponent ;
- sh:sourceShape ex:PersonShape ;
+ sh:sourceShape ex:PersonShape-skills ;
sh:value rdf:nil ;
] ;
sh:result [
@@ -66,7 +72,7 @@ ex:person3
sh:resultPath ex:skills ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:MinListLengthConstraintComponent ;
- sh:sourceShape ex:PersonShape ;
+ sh:sourceShape ex:PersonShape-skills ;
sh:value ex:notAList ;
] ;
] ;
diff --git a/shacl12-test-suite/tests/core/property/uniqueMembers-001.ttl b/shacl12-test-suite/tests/core/property/uniqueMembers-001.ttl
index d1e58e29..2f77226a 100644
--- a/shacl12-test-suite/tests/core/property/uniqueMembers-001.ttl
+++ b/shacl12-test-suite/tests/core/property/uniqueMembers-001.ttl
@@ -11,10 +11,14 @@
ex:PersonShape
rdf:type sh:NodeShape ;
sh:targetClass ex:Person ;
- sh:property [
- sh:path ex:preferences ;
- sh:uniqueMembers true ;
- ] ;
+ sh:property ex:PersonShape-preferences
+ ;
+.
+
+ex:PersonShape-preferences
+ rdf:type sh:PropertyShape ;
+ sh:path ex:preferences ;
+ sh:uniqueMembers true ;
.
# Satisfies all constraints
@@ -66,7 +70,7 @@ _:b1
sh:resultPath ex:preferences ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:UniqueMembersConstraintComponent ;
- sh:sourceShape ex:PersonShape ;
+ sh:sourceShape ex:PersonShape-preferences ;
sh:value _:b1 ;
sh:detail [
rdf:type sh:ValidationResult ;
@@ -74,7 +78,7 @@ _:b1
sh:resultPath ex:preferences ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:UniqueMembersConstraintComponent ;
- sh:sourceShape ex:PersonShape ;
+ sh:sourceShape ex:PersonShape-preferences ;
sh:value "coffee" ;
], [
rdf:type sh:ValidationResult ;
@@ -82,7 +86,7 @@ _:b1
sh:resultPath ex:preferences ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:UniqueMembersConstraintComponent ;
- sh:sourceShape ex:PersonShape ;
+ sh:sourceShape ex:PersonShape-preferences ;
sh:value "tea" ;
]
] ;
@@ -92,7 +96,7 @@ _:b1
sh:resultPath ex:preferences ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:UniqueMembersConstraintComponent ;
- sh:sourceShape ex:PersonShape ;
+ sh:sourceShape ex:PersonShape-preferences ;
sh:value ex:notAList ;
] ;
] ;
From 9195eca481fc853502c4239cee5c2d7711304932 Mon Sep 17 00:00:00 2001
From: Jesse Wright <63333554+jeswr@users.noreply.github.com>
Date: Thu, 3 Jul 2025 18:19:12 +0200
Subject: [PATCH 50/53] chore: remove lingering `uniqList` references
---
shacl12-vocabularies/shacl-shacl.ttl | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/shacl12-vocabularies/shacl-shacl.ttl b/shacl12-vocabularies/shacl-shacl.ttl
index 67871c82..0c808319 100644
--- a/shacl12-vocabularies/shacl-shacl.ttl
+++ b/shacl12-vocabularies/shacl-shacl.ttl
@@ -75,7 +75,7 @@ shsh:ShapeShape
sh:maxInclusive, sh:maxLength, sh:memberShape, sh:minCount, sh:minExclusive, sh:minInclusive, sh:minLength, sh:node, sh:nodeKind,
sh:not, sh:or, sh:pattern, sh:property, sh:qualifiedMaxCount, sh:qualifiedMinCount, sh:qualifiedValueShape,
sh:qualifiedValueShape, sh:qualifiedValueShapesDisjoint, sh:qualifiedValueShapesDisjoint, sh:uniqueLang, sh:xone ,
- sh:minListLength, sh:maxListLength, sh:uniqList ;
+ sh:minListLength, sh:maxListLength, sh:uniqueMembers ;
sh:targetObjectsOf sh:memberShape ; # memberShape-node
sh:targetObjectsOf sh:node ; # node-node
@@ -243,8 +243,8 @@ shsh:ShapeShape
] ;
sh:property [
sh:path sh:uniqueMembers ;
- sh:datatype xsd:boolean ; # uniqList-datatype
- sh:maxCount 1 ; # uniqList-maxCount
+ sh:datatype xsd:boolean ; # uniqueMembers-datatype
+ sh:maxCount 1 ; # uniqueMembers-maxCount
] ;
sh:property [
sh:path sh:nodeKind ;
From 58daff683e4d0c3c200018051082235fac217154 Mon Sep 17 00:00:00 2001
From: Holger Knublauch
Date: Mon, 7 Jul 2025 11:17:54 +0300
Subject: [PATCH 51/53] Fixed membershape test case
---
shacl12-test-suite/tests/core/node/memberShape-001.ttl | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/shacl12-test-suite/tests/core/node/memberShape-001.ttl b/shacl12-test-suite/tests/core/node/memberShape-001.ttl
index 9dde67e2..bb251f2b 100644
--- a/shacl12-test-suite/tests/core/node/memberShape-001.ttl
+++ b/shacl12-test-suite/tests/core/node/memberShape-001.ttl
@@ -96,6 +96,7 @@ ex:list10
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:MemberShapeConstraintComponent ;
sh:sourceShape ex:IRIListShape ;
+ sh:value ex:list2 ;
sh:detail [
rdf:type sh:ValidationResult ;
sh:focusNode "Bob" ;
@@ -127,6 +128,7 @@ ex:list10
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:MemberShapeConstraintComponent ;
sh:sourceShape ex:IRIListShape ;
+ sh:value ex:list5 ;
sh:detail [
rdf:type sh:ValidationResult ;
sh:focusNode "Charlie" ;
@@ -157,7 +159,7 @@ ex:list10
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:MemberShapeConstraintComponent ;
sh:sourceShape ex:IRIListShape ;
- sh:value ex:list8 ;
+ sh:value ex:list7 ;
] ;
sh:result [
rdf:type sh:ValidationResult ;
@@ -165,7 +167,7 @@ ex:list10
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:MemberShapeConstraintComponent ;
sh:sourceShape ex:IRIListShape ;
- sh:value ex:list10 ;
+ sh:value ex:list9 ;
] ;
] ;
mf:status sht:approved ;
From e01a2a6d320296f74bd22d80d2895b80bef7cf28 Mon Sep 17 00:00:00 2001
From: Holger Knublauch
Date: Mon, 7 Jul 2025 11:19:45 +0300
Subject: [PATCH 52/53] Fixed missing sh:value at minListLength test
---
shacl12-test-suite/tests/core/node/minListLength-001.ttl | 1 +
1 file changed, 1 insertion(+)
diff --git a/shacl12-test-suite/tests/core/node/minListLength-001.ttl b/shacl12-test-suite/tests/core/node/minListLength-001.ttl
index 118a7ec0..5b38bf2f 100644
--- a/shacl12-test-suite/tests/core/node/minListLength-001.ttl
+++ b/shacl12-test-suite/tests/core/node/minListLength-001.ttl
@@ -44,6 +44,7 @@ ex:list0
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:MinListLengthConstraintComponent ;
sh:sourceShape ex:ListShape ;
+ sh:value rdf:nil ;
] ;
sh:result [
rdf:type sh:ValidationResult ;
From 77f8392eb6c135a62d921e69e627180796115885 Mon Sep 17 00:00:00 2001
From: Holger Knublauch
Date: Mon, 7 Jul 2025 11:40:37 +0300
Subject: [PATCH 53/53] Fixed missing sh:value at uniqueMembers test case
---
shacl12-test-suite/tests/core/node/uniqueMembers-001.ttl | 1 +
1 file changed, 1 insertion(+)
diff --git a/shacl12-test-suite/tests/core/node/uniqueMembers-001.ttl b/shacl12-test-suite/tests/core/node/uniqueMembers-001.ttl
index 287e9137..bc2790dc 100644
--- a/shacl12-test-suite/tests/core/node/uniqueMembers-001.ttl
+++ b/shacl12-test-suite/tests/core/node/uniqueMembers-001.ttl
@@ -48,6 +48,7 @@ ex:list1
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:UniqueMembersConstraintComponent ;
sh:sourceShape ex:ListShape ;
+ sh:value ex:list1 ;
sh:detail [
rdf:type sh:ValidationResult ;
sh:focusNode ex:list1 ;