From 0c927e9299d772ea5f71801fd8ec1d634a1bcbe3 Mon Sep 17 00:00:00 2001 From: Robert David <9427084@gmail.com> Date: Tue, 8 Sep 2026 16:36:04 +0200 Subject: [PATCH 1/9] First draft of report extension for infos on matched nodes --- shacl12-core/index.html | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/shacl12-core/index.html b/shacl12-core/index.html index b8d9d6dde..ba9542435 100644 --- a/shacl12-core/index.html +++ b/shacl12-core/index.html @@ -2619,6 +2619,26 @@
Processor Configuration (sh:ProcessorConfiguration)
maximum recursion depth, or other runtime parameters.

+
+
Node Assignment Count (sh:nodeAssignmentCount)
+

+ A valdiation report MAY contain one value for the property sh:nodeAssignmentCount. + The value MUST be equal to the total number of shape assignments of a focus node to a shape. + It MUST include focus nodes of target declarations other than sh:targetNode, which are determined by grounding the target nodes based on the specific target declaration. + TODO: provide a concrete definition of grounding. + +

+
+
+
Assignment (sh:assignment)
+

+ A valdiation report MAY containt values for the property sh:assignment. + If it does, it MUST provide one value for every pair of focus node to a shape. + If the target declaration is other than sh:targetNode, the pairs are determined by grounding the target nodes based on the specific target declaration. + Each value of sh:assignment is a SHACL instance of the class sh:ShapeAssignment. + TODO: provide a concrete definition of grounding. +

+
@@ -2711,6 +2731,15 @@

Severity (sh:resultSeverity)

+
+

Validation Details (sh:ShapeAssignment)

+

+ SHACL defines sh:ShapeAssignment to report individual assigmments of a focus node to a shape. + Each instance of sh:ShapeAssignment MUST have exactly one value for the property sh:focusNode + and exactly one value for the property sh:sourceShape. + It MAY provide exactly one value for the property sh:conforms to indicate an individual conformance of a focus node to a shape. +

+
From 0a17757a1cd221a71664904fcd0ae37546deda3b Mon Sep 17 00:00:00 2001 From: Robert David <9427084@gmail.com> Date: Wed, 9 Sep 2026 11:35:24 +0200 Subject: [PATCH 2/9] Added shacl.ttl for shape assignment vocabulary + minor adjustments to the shacl-core descriptions --- shacl/shacl.ttl | 23 +++++++++++++++++++++++ shacl12-core/index.html | 4 ++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/shacl/shacl.ttl b/shacl/shacl.ttl index ccf3ee86b..bdc1f98db 100644 --- a/shacl/shacl.ttl +++ b/shacl/shacl.ttl @@ -171,6 +171,14 @@ sh:conforms rdfs:range xsd:boolean ; rdfs:isDefinedBy sh: . +sh:nodeAssignmentCount + a rdf:Property ; + rdfs:label "Node assignment count"@en ; + rdfs:comment "The total number of shape assignments of shapes to focus nodes."@en ; + rdfs:domain sh:ValidationReport ; + rdfs:range xsd:integer ; + rdfs:isDefinedBy sh: . + sh:result a rdf:Property ; rdfs:label "result"@en ; @@ -179,6 +187,14 @@ sh:result rdfs:range sh:ValidationResult ; rdfs:isDefinedBy sh: . +sh:assignment + a rdf:Property ; + rdfs:label "assignment"@en ; + rdfs:comment "The shape assignments that the validation was processed on."@en ; + rdfs:domain sh:ValidationReport ; + rdfs:range sh:ShapeAssignment ; + rdfs:isDefinedBy sh: . + sh:shapesGraphWellFormed a rdf:Property ; rdfs:label "shapes graph well-formed"@en ; @@ -201,6 +217,13 @@ sh:ValidationResult rdfs:subClassOf sh:AbstractResult ; rdfs:isDefinedBy sh: . +sh:ShapeAssignment + a rdfs:Class ; + rdfs:label "Shape assignment"@en ; + rdfs:comment "The class of assignments of shapes to nodes."@en ; + rdfs:subClassOf sh:AbstractResult ; + rdfs:isDefinedBy sh: . + sh:Severity a rdfs:Class ; rdfs:label "Severity"@en ; diff --git a/shacl12-core/index.html b/shacl12-core/index.html index ba9542435..03fce758b 100644 --- a/shacl12-core/index.html +++ b/shacl12-core/index.html @@ -2623,7 +2623,7 @@
Processor Configuration (sh:ProcessorConfiguration)
Node Assignment Count (sh:nodeAssignmentCount)

A valdiation report MAY contain one value for the property sh:nodeAssignmentCount. - The value MUST be equal to the total number of shape assignments of a focus node to a shape. + The value MUST be equal to the total number of shape assignments of a shape to a focus node. It MUST include focus nodes of target declarations other than sh:targetNode, which are determined by grounding the target nodes based on the specific target declaration. TODO: provide a concrete definition of grounding. @@ -2633,7 +2633,7 @@

Node Assignment Count (sh:nodeAssignmentCount)
Assignment (sh:assignment)

A valdiation report MAY containt values for the property sh:assignment. - If it does, it MUST provide one value for every pair of focus node to a shape. + If it does, it MUST provide one value for every pair of shape and focus node. If the target declaration is other than sh:targetNode, the pairs are determined by grounding the target nodes based on the specific target declaration. Each value of sh:assignment is a SHACL instance of the class sh:ShapeAssignment. TODO: provide a concrete definition of grounding. From 5da5464ec583d2b410e71075dbe82888beade37c Mon Sep 17 00:00:00 2001 From: Robert David <9427084@gmail.com> Date: Thu, 1 Oct 2026 15:56:02 +0200 Subject: [PATCH 3/9] Clarified the node grounding + added disjointness of sh:ValidationResult and sh:ShapeAssignment --- shacl/shacl.ttl | 1 + shacl12-core/index.html | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/shacl/shacl.ttl b/shacl/shacl.ttl index bdc1f98db..a33592573 100644 --- a/shacl/shacl.ttl +++ b/shacl/shacl.ttl @@ -222,6 +222,7 @@ sh:ShapeAssignment rdfs:label "Shape assignment"@en ; rdfs:comment "The class of assignments of shapes to nodes."@en ; rdfs:subClassOf sh:AbstractResult ; + owl:disjointWith sh:ValidationResult ; rdfs:isDefinedBy sh: . sh:Severity diff --git a/shacl12-core/index.html b/shacl12-core/index.html index 03fce758b..5e2d8a97e 100644 --- a/shacl12-core/index.html +++ b/shacl12-core/index.html @@ -2624,9 +2624,10 @@

Node Assignment Count (sh:nodeAssignmentCount)

A valdiation report MAY contain one value for the property sh:nodeAssignmentCount. The value MUST be equal to the total number of shape assignments of a shape to a focus node. - It MUST include focus nodes of target declarations other than sh:targetNode, which are determined by grounding the target nodes based on the specific target declaration. - TODO: provide a concrete definition of grounding. - + sh:nodeAssignmentCount only counts shapes and focus nodes defined in a target declaration. + The specific focus nodes are determined by grounding all target nodes of all target declarations. + For example, target declarations of sh:targetNode directly specify the target nodes, + whereas the target nodes of a sh:targetClass target declaration are the SHACL instances of the specified class.

@@ -2635,7 +2636,7 @@
Assignment (sh:assignment)
A valdiation report MAY containt values for the property sh:assignment. If it does, it MUST provide one value for every pair of shape and focus node. If the target declaration is other than sh:targetNode, the pairs are determined by grounding the target nodes based on the specific target declaration. - Each value of sh:assignment is a SHACL instance of the class sh:ShapeAssignment. + Each value of sh:assignment is a SHACL instance of the class sh:ShapeAssignment. TODO: provide a concrete definition of grounding.

@@ -2738,6 +2739,7 @@

Validation Details (sh:ShapeAssignment)

Each instance of sh:ShapeAssignment MUST have exactly one value for the property sh:focusNode and exactly one value for the property sh:sourceShape. It MAY provide exactly one value for the property sh:conforms to indicate an individual conformance of a focus node to a shape. + sh:ShapeAssignment is disjoint with sh:ValidationResult.

From 1cc07ddee1cb5e2e609a2e618f8b437297be18f2 Mon Sep 17 00:00:00 2001 From: Robert David <9427084@gmail.com> Date: Wed, 7 Oct 2026 15:48:18 +0200 Subject: [PATCH 4/9] Moved disjointness statement from shacl.ttl (OWL) to shac-shacl.ttl (SHACL using sh:not) --- shacl/shacl-shacl.ttl | 7 +++++++ shacl/shacl.ttl | 3 +-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/shacl/shacl-shacl.ttl b/shacl/shacl-shacl.ttl index 1aa2a2a74..7569494e6 100644 --- a/shacl/shacl-shacl.ttl +++ b/shacl/shacl-shacl.ttl @@ -408,3 +408,10 @@ shsh:EntailmentShape a sh:NodeShape ; sh:targetObjectsOf sh:entailment ; sh:nodeKind sh:IRI . # entailment-nodeKind + +shsh:ShapeAssignmentShape + a sh:NodeShape ; + sh:targetClass sh:ShapeAssignment ; + sh:not [ + sh:class sh:ValidationResult ; + ] . diff --git a/shacl/shacl.ttl b/shacl/shacl.ttl index a33592573..bc57c1102 100644 --- a/shacl/shacl.ttl +++ b/shacl/shacl.ttl @@ -220,9 +220,8 @@ sh:ValidationResult sh:ShapeAssignment a rdfs:Class ; rdfs:label "Shape assignment"@en ; - rdfs:comment "The class of assignments of shapes to nodes."@en ; + rdfs:comment "The class of assignments of shapes to nodes, disjoint with sh:ValidationResult."@en ; rdfs:subClassOf sh:AbstractResult ; - owl:disjointWith sh:ValidationResult ; rdfs:isDefinedBy sh: . sh:Severity From ec7c6a7ea60521432b117e1a36150de48a149779 Mon Sep 17 00:00:00 2001 From: Robert David <9427084@gmail.com> Date: Wed, 7 Oct 2026 15:57:28 +0200 Subject: [PATCH 5/9] Fixed typos and style --- shacl12-core/index.html | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/shacl12-core/index.html b/shacl12-core/index.html index 112adbad8..834c3c407 100644 --- a/shacl12-core/index.html +++ b/shacl12-core/index.html @@ -2622,18 +2622,20 @@
Processor Configuration (sh:ProcessorConfiguration)
Node Assignment Count (sh:nodeAssignmentCount)

- A valdiation report MAY contain one value for the property sh:nodeAssignmentCount. + A validation report MAY contain one value for the property sh:nodeAssignmentCount. The value MUST be equal to the total number of shape assignments of a shape to a focus node. sh:nodeAssignmentCount only counts shapes and focus nodes defined in a target declaration. The specific focus nodes are determined by grounding all target nodes of all target declarations. +

+
+
For example, target declarations of sh:targetNode directly specify the target nodes, whereas the target nodes of a sh:targetClass target declaration are the SHACL instances of the specified class. -

Assignment (sh:assignment)

- A valdiation report MAY containt values for the property sh:assignment. + A validation report MAY containt values for the property sh:assignment. If it does, it MUST provide one value for every pair of shape and focus node. If the target declaration is other than sh:targetNode, the pairs are determined by grounding the target nodes based on the specific target declaration. Each value of sh:assignment is a SHACL instance of the class sh:ShapeAssignment. From dbd1f84b40fdace0447a2e2316d13fae34d1e501 Mon Sep 17 00:00:00 2001 From: Robert David <9427084@gmail.com> Date: Wed, 7 Oct 2026 15:58:29 +0200 Subject: [PATCH 6/9] Removed invalid and redundant use of sh:conforms for sh:ShapeAssignment --- shacl12-core/index.html | 1 - 1 file changed, 1 deletion(-) diff --git a/shacl12-core/index.html b/shacl12-core/index.html index 834c3c407..44b1a1971 100644 --- a/shacl12-core/index.html +++ b/shacl12-core/index.html @@ -2740,7 +2740,6 @@

Validation Details (sh:ShapeAssignment)

SHACL defines sh:ShapeAssignment to report individual assigmments of a focus node to a shape. Each instance of sh:ShapeAssignment MUST have exactly one value for the property sh:focusNode and exactly one value for the property sh:sourceShape. - It MAY provide exactly one value for the property sh:conforms to indicate an individual conformance of a focus node to a shape. sh:ShapeAssignment is disjoint with sh:ValidationResult.

From eca6daaf9bdda6d45289f591c1116b7087dcdbd1 Mon Sep 17 00:00:00 2001 From: Robert David <9427084@gmail.com> Date: Wed, 7 Oct 2026 16:27:34 +0200 Subject: [PATCH 7/9] Provided an example for sh:ShapeAssignment --- shacl12-core/index.html | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/shacl12-core/index.html b/shacl12-core/index.html index 44b1a1971..60fb64dc2 100644 --- a/shacl12-core/index.html +++ b/shacl12-core/index.html @@ -2518,6 +2518,26 @@

Validation Report

+

+ A validation report MAY optionally provide information on shape assignments to focus nodes. + The following graph represents an example of a validation report for the validation of a data graph that provides shape ssignment information. +

+ +

Validation Report (sh:ValidationReport)

From b272c05d80e99ec5aa90bc4892196543a20d3f8d Mon Sep 17 00:00:00 2001 From: Robert David <9427084@gmail.com> Date: Wed, 7 Oct 2026 16:41:58 +0200 Subject: [PATCH 8/9] Removed 'grounding' and clarified how target nodes are determined --- shacl12-core/index.html | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/shacl12-core/index.html b/shacl12-core/index.html index 60fb64dc2..bdd1f9ff5 100644 --- a/shacl12-core/index.html +++ b/shacl12-core/index.html @@ -2643,9 +2643,8 @@

Processor Configuration (sh:ProcessorConfiguration)
Node Assignment Count (sh:nodeAssignmentCount)

A validation report MAY contain one value for the property sh:nodeAssignmentCount. - The value MUST be equal to the total number of shape assignments of a shape to a focus node. - sh:nodeAssignmentCount only counts shapes and focus nodes defined in a target declaration. - The specific focus nodes are determined by grounding all target nodes of all target declarations. + The value MUST be equal to the total number of shape assignments of a shape to a focus node + declared or produced by a target declaration.

From ef0d6554b83706001fe1b27bf3023c3a40b4d319 Mon Sep 17 00:00:00 2001 From: Robert David <9427084@gmail.com> Date: Wed, 7 Oct 2026 16:47:51 +0200 Subject: [PATCH 9/9] Removed 'grounding' and clarified how target nodes are determined --- shacl12-core/index.html | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/shacl12-core/index.html b/shacl12-core/index.html index bdd1f9ff5..7aff7d532 100644 --- a/shacl12-core/index.html +++ b/shacl12-core/index.html @@ -2646,19 +2646,17 @@
Node Assignment Count (sh:nodeAssignmentCount)
The value MUST be equal to the total number of shape assignments of a shape to a focus node declared or produced by a target declaration.

-
-
+

For example, target declarations of sh:targetNode directly specify the target nodes, whereas the target nodes of a sh:targetClass target declaration are the SHACL instances of the specified class. +

Assignment (sh:assignment)

A validation report MAY containt values for the property sh:assignment. - If it does, it MUST provide one value for every pair of shape and focus node. - If the target declaration is other than sh:targetNode, the pairs are determined by grounding the target nodes based on the specific target declaration. + If it does, it MUST provide one value for every pair of shape and focus node declared or produced by a target declaration. Each value of sh:assignment is a SHACL instance of the class sh:ShapeAssignment. - TODO: provide a concrete definition of grounding.