Skip to content

feat: #192 add severity levels that are not violations #409

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: gh-pages
Choose a base branch
from
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
16 changes: 14 additions & 2 deletions shacl12-core/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1739,6 +1739,14 @@ <h4>Declaring the Severity of a Shape or Constraint</h4>
<th>Severity</th>
<th>Description</th>
</tr>
<tr>
<td><code>sh:Trace</code></td>
<td>A trace message that is not a violation.</td>
</tr>
<tr>
<td><code>sh:Debug</code></td>
<td>A debug message that is not a violation.</td>
</tr>
<tr>
<td><code>sh:Info</code></td>
<td>A non-critical constraint violation indicating an informative message.</td>
Expand All @@ -1752,6 +1760,10 @@ <h4>Declaring the Severity of a Shape or Constraint</h4>
<td>A constraint violation.</td>
</tr>
</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 Down Expand Up @@ -2802,7 +2814,7 @@ <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> is empty 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 representing a violation and no <a>failure</a>
has been reported by it.
</p>
<p>
Expand Down Expand Up @@ -2917,7 +2929,7 @@ <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>, and <code>false</code> otherwise.
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="result">
Expand Down
12 changes: 12 additions & 0 deletions shacl12-vocabularies/shacl.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,18 @@ sh:Severity
rdfs:subClassOf rdfs:Resource ;
rdfs:isDefinedBy sh: .

sh:Trace
a sh:Severity ;
rdfs:label "Trace"@en ;
rdfs:comment "The severity for a trace validation result."@en ;
rdfs:isDefinedBy sh: .

sh:Debug
a sh:Severity ;
rdfs:label "Debug"@en ;
rdfs:comment "The severity for a debug validation result."@en ;
rdfs:isDefinedBy sh: .

sh:Info
a sh:Severity ;
rdfs:label "Info"@en ;
Expand Down