Skip to content
Open
Show file tree
Hide file tree
Changes from 3 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
68 changes: 59 additions & 9 deletions shacl12-core/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1815,10 +1815,6 @@ <h4>Declaring the Severity of a Shape or Constraint</h4>
<td>A constraint violation.</td>
</tr>
</tbody></table>
<p>
Validation engines MAY treat <code>sh:Info</code> and <code>sh:Warning</code> as non-violating based on
options passed to the engine. By default, they are treated as violations.
</p>
<p>
In addition to declaring severities per shape, the property <code>sh:severity</code> can also be used
on a <a>reifier</a> for a triple where the <a>shape</a> is the <a>subject</a> and one of the <a>parameters</a>
Expand All @@ -1832,8 +1828,8 @@ <h4>Declaring the Severity of a Shape or Constraint</h4>
</span></p>
<p><em>The remainder of this section is informative.</em></p>
<p>
The specific values of <code>sh:severity</code> have no impact on the validation,
but MAY be used by user interface tools to categorize validation results.
The validation handles the values of <code>sh:severity</code> according to the <a>conformance checking</a>.
Additionally, user interface tools MAY use the values to categorize validation results.
The values of <code>sh:severity</code> are used by SHACL processors to populate the <code>sh:resultSeverity</code> field of
validation results, see <a href="#results-severity">section on severity in validation results</a>.
Any IRI can be used as a severity.
Expand Down Expand Up @@ -2897,9 +2893,15 @@ <h4>Handling of Recursive Shapes</h4>
<h3>Conformance Checking</h3>
<p>
A <a>focus node</a> <dfn data-lt="conform|conformance">conforms</dfn> to a <a>shape</a> if and only if
the set of result of the <a>validation</a> of the <a>focus node</a> against the <a>shape</a> does not contain any results with a severity level representing a violation and no <a>failure</a>
the set of result of the <a>validation</a> of the <a>focus node</a> against the <a>shape</a> does not contain any results with a severity level of the set of disallowed levels and no <a>failure</a>
has been reported by it.
</p>
<p>
The set of disallowed severity levels is defined as the objects of triples with predicate
<code>sh:conformanceDisallows</code> and the validation report as subject.
If the validation report contains no such triples, <code>sh:Violation</code>, <code>sh:Warning</code>, and
<code>sh:Info</code> are set as defaults.
</p>
<p>
<dfn data-lt="conformance check">Conformance checking</dfn> produces <code>true</code> if and only if a given <a>focus node</a>
<a>conforms</a> to a given <a>shape</a>, and <code>false</code> otherwise.
Expand Down Expand Up @@ -2934,15 +2936,48 @@ <h3>Validation Report</h3>
<div class="turtle">
[ a sh:ValidationReport ;
sh:conforms true ;
sh:conformanceDisallows sh:Violation ;
sh:result [
a sh:ValidationResult ;
sh:resultSeverity sh:Warning ;
sh:focusNode ex:Bob ;
sh:resultPath ex:age ;
sh:value "twenty two" ;
sh:resultMessage "ex:age expects a literal of datatype xsd:integer." ;
sh:sourceConstraintComponent sh:DatatypeConstraintComponent ;
sh:sourceShape ex:PersonShape-age ;
]
] .
</div>
<div class="jsonld">
<pre class="jsonld">{
"@id": "_:b1",
"@type": "sh:ValidationReport",
"sh:conformanceDisallows": {
"@id": "sh:Violation"
},
"sh:conforms": {
"@type": "xsd:boolean",
"@value": "true"
},
"sh:result": {
"@type": "sh:ValidationResult",
"sh:focusNode": {
"@id": "ex:Bob"
},
"sh:resultMessage": "ex:age expects a literal of datatype xsd:integer.",
"sh:resultPath": {
"@id": "ex:age"
},
"sh:resultSeverity": {
"@id": "sh:Warning"
},
"sh:sourceConstraintComponent": {
"@id": "sh:DatatypeConstraintComponent"
},
"sh:sourceShape": {
"@id": "ex:PersonShape-age"
},
"sh:value": "twenty two"
}
}</pre>
</div>
Expand All @@ -2957,6 +2992,7 @@ <h3>Validation Report</h3>
<div class="turtle">
[ a sh:ValidationReport ;
sh:conforms false ;
sh:conformanceDisallows sh:Violation ;
sh:result [
a sh:ValidationResult ;
sh:resultSeverity sh:Violation ;
Expand All @@ -2972,6 +3008,9 @@ <h3>Validation Report</h3>
<div class="jsonld">
<pre class="jsonld">{
"@type": "sh:ValidationReport",
"sh:conformanceDisallows": {
"@id": "sh:Violation"
},
"sh:conforms": {
"@type": "xsd:boolean",
"@value": "false"
Expand Down Expand Up @@ -3012,7 +3051,18 @@ <h5>Conforms (sh:conforms)</h5>
<p>
Each SHACL instance of <code>sh:ValidationReport</code> in the results graph has exactly one value for the property <code>sh:conforms</code> and the value is of datatype <code>xsd:boolean</code>.
It represents the outcome of the <a>conformance checking</a>.
The value of <code>sh:conforms</code> is <code>true</code> if and only if the <a>validation</a> did not produce any <a>validation results</a> with a severity level representing a violation, and <code>false</code> otherwise.
</p>
</section>
<section id="conformanceDisallows">
<h5>Conformance Disallow Set (sh:conformanceDisallows)</h5>
<p>
Each SHACL instance of <code>sh:ValidationReport</code> in the results graph can have one or more values
for the property <code>sh:conformanceDisallows</code>. All values combined define the set of disallowed
severity levels. All values of <code>sh:conformanceDisallows</code> must be IRIs.
</p>
<p>
The conformance disallow set is defined by the validation engine.
A validation engine MAY provide mechanisms to customize this set.
</p>
</section>
<section id="result">
Expand Down
8 changes: 8 additions & 0 deletions shacl12-vocabularies/shacl.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,14 @@ sh:conforms
rdfs:range xsd:boolean ;
rdfs:isDefinedBy sh: .

sh:conformanceDisallows
a rdf:Property ;
rdfs:label "conformance disallows"@en ;
rdfs:comment "Severity levels that are evaluated in the conformance check."@en ;
rdfs:domain sh:ValidationReport ;
rdfs:range sh:Severity ;
rdfs:isDefinedBy sh: .

sh:result
a rdf:Property ;
rdfs:label "result"@en ;
Expand Down