Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions shacl/shacl-shacl.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -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 ;
] .
23 changes: 23 additions & 0 deletions shacl/shacl.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -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 ;
Expand All @@ -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 ;
Expand All @@ -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, disjoint with sh:ValidationResult."@en ;
rdfs:subClassOf sh:AbstractResult ;
Comment on lines +220 to +224

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the relationship between this class and its sibling sh:ValidationResult? Is a ValidationResult implicitly a ShapeAssignment?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or, never (i.e., classes are disjoint, to be encoded in SHACL-SHACL)?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather never, i guess.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added disjointness statement to the shacl.ttl.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, except shacl.ttl purposefully doesn't use most owl: concepts. Better to leave a firm statement in the rdfs:comment, and update shacl-shacl.ttl as part of this PR's changes.

rdfs:isDefinedBy sh: .

sh:Severity
a rdfs:Class ;
rdfs:label "Severity"@en ;
Expand Down
49 changes: 49 additions & 0 deletions shacl12-core/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2518,6 +2518,26 @@ <h3>Validation Report</h3>
</div>
</aside>

<p>
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.
</p>
<aside class="example" title="Example of a validation report providing shape assignment information">
<div class="results-graph">
<div class="turtle">
[ a sh:ValidationReport ;
sh:conforms true ;
sh:nodeAssignmentCount 1 ;
sh:assignment [
a sh:ShapeAssignment ;
sh:focusNode ex:Bob ;
sh:sourceShape ex:PersonShape-age ;
]
] .
</div>
</div>
</aside>

<section id="results-validation-report">
<h4>Validation Report (sh:ValidationReport)</h4>
<p>
Expand Down Expand Up @@ -2619,6 +2639,26 @@ <h5>Processor Configuration (sh:ProcessorConfiguration)</h5>
maximum recursion depth, or other runtime parameters.
</p>
</section>
<section id="nodeAssignmentCount"><!-- ISSUE-1221 -->
<h5>Node Assignment Count (sh:nodeAssignmentCount)</h5>
<p>
A validation report MAY contain one value for the property <code>sh:nodeAssignmentCount</code>.
The value MUST be equal to the total number of shape assignments of a <a>shape</a> to a <a>focus node</a>
declared or produced by a <a href="#targets">target declaration</a>.
</p>
<p class="informative">
For example, target declarations of <a href="#targetNode"><code>sh:targetNode</code></a> directly specify the target nodes,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possible editorial nit: Isn't "For example"-style text put after a "The remainder of this section is informative" divider?

whereas the target nodes of a <a href="#targetClass"><code>sh:targetClass</code></a> target declaration are the SHACL instances of the specified class.
</p>
</section>
<section id="assignment"><!-- ISSUE-1221 -->
<h5>Assignment (sh:assignment)</h5>
<p>
A validation report MAY containt values for the property <code>sh:assignment</code>.
If it does, it MUST provide one value for every pair of <a>shape</a> and <a>focus node</a> declared or produced by a <a href="#targets">target declaration</a>.
Each value of <code>sh:assignment</code> is a SHACL instance of the class <code>sh:ShapeAssignment</code>.
</p>
</section>
</section>

<section id="results-validation-result">
Expand Down Expand Up @@ -2711,6 +2751,15 @@ <h4>Severity (sh:resultSeverity)</h4>
</ol>
</section>
</section>
<section id="results-shape-assignment"><!-- ISSUE-1221 -->
<h4>Validation Details (sh:ShapeAssignment)</h4>
<p>
SHACL defines <code>sh:ShapeAssignment</code> to report individual assigmments of a <a>focus node</a> to a <a>shape</a>.
Each instance of <code>sh:ShapeAssignment</code> MUST have exactly one value for the property <code>sh:focusNode</code>
and exactly one value for the property <code>sh:sourceShape</code>.
<code>sh:ShapeAssignment</code> is disjoint with <code>sh:ValidationResult</code>.
</p>
</section>
</section>

<section id="value-nodes">
Expand Down
Loading