diff --git a/shacl12-core/index.html b/shacl12-core/index.html index f9a6a2c0..fbad4cfa 100644 --- a/shacl12-core/index.html +++ b/shacl12-core/index.html @@ -1739,6 +1739,14 @@

Declaring the Severity of a Shape or Constraint

Severity Description + + sh:Trace + A trace message that is not a violation. + + + sh:Debug + A debug message that is not a violation. + sh:Info A non-critical constraint violation indicating an informative message. @@ -1752,6 +1760,10 @@

Declaring the Severity of a Shape or Constraint

A constraint violation. +

+ Validation engines MAY treat sh:Info and sh:Warning as non-violating based on + options passed to the engine. By default, they are treated as violations. +

In addition to declaring severities per shape, the property sh:severity can also be used on a reifier for a triple where the shape is the subject and one of the parameters @@ -2802,7 +2814,7 @@

Handling of Recursive Shapes

Conformance Checking

A focus node conforms to a shape if and only if - the set of result of the validation of the focus node against the shape is empty and no failure + the set of result of the validation of the focus node against the shape does not contain any results with a severity level representing a violation and no failure has been reported by it.

@@ -2917,7 +2929,7 @@

Conforms (sh:conforms)

Each SHACL instance of sh:ValidationReport in the results graph has exactly one value for the property sh:conforms and the value is of datatype xsd:boolean. It represents the outcome of the conformance checking. - The value of sh:conforms is true if and only if the validation did not produce any validation results, and false otherwise. + The value of sh:conforms is true if and only if the validation did not produce any validation results with a severity level representing a violation, and false otherwise.

diff --git a/shacl12-test-suite/tests/core/misc/manifest.ttl b/shacl12-test-suite/tests/core/misc/manifest.ttl index 8d028d39..6db6b369 100644 --- a/shacl12-test-suite/tests/core/misc/manifest.ttl +++ b/shacl12-test-suite/tests/core/misc/manifest.ttl @@ -13,4 +13,6 @@ mf:include ; mf:include ; mf:include ; + mf:include ; + mf:include ; . \ No newline at end of file diff --git a/shacl12-test-suite/tests/core/misc/severity-004.ttl b/shacl12-test-suite/tests/core/misc/severity-004.ttl new file mode 100644 index 00000000..7474c102 --- /dev/null +++ b/shacl12-test-suite/tests/core/misc/severity-004.ttl @@ -0,0 +1,43 @@ +@prefix dash: . +@prefix ex: . +@prefix mf: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix sht: . +@prefix xsd: . + +ex:TestShape + rdf:type sh:NodeShape ; + sh:datatype xsd:integer ; + sh:severity sh:Debug ; + sh:targetNode "Hello" ; +. +<> + rdf:type mf:Manifest ; + mf:entries ( + + ) ; +. + + rdf:type sht:Validate ; + rdfs:label "Test of sh:severity sh:Debug 004" ; + mf:action [ + sht:dataGraph <> ; + sht:shapesGraph <> ; + ] ; + mf:result [ + rdf:type sh:ValidationReport ; + sh:conforms "true"^^xsd:boolean ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode "Hello" ; + sh:resultSeverity sh:Debug ; + sh:sourceConstraintComponent sh:DatatypeConstraintComponent ; + sh:sourceShape ex:TestShape ; + sh:value "Hello" ; + ] ; + ] ; + mf:status sht:approved ; +. diff --git a/shacl12-test-suite/tests/core/misc/severity-005.ttl b/shacl12-test-suite/tests/core/misc/severity-005.ttl new file mode 100644 index 00000000..7e64e6f8 --- /dev/null +++ b/shacl12-test-suite/tests/core/misc/severity-005.ttl @@ -0,0 +1,43 @@ +@prefix dash: . +@prefix ex: . +@prefix mf: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix sht: . +@prefix xsd: . + +ex:TestShape + rdf:type sh:NodeShape ; + sh:datatype xsd:integer ; + sh:severity sh:Trace ; + sh:targetNode "Hello" ; +. +<> + rdf:type mf:Manifest ; + mf:entries ( + + ) ; +. + + rdf:type sht:Validate ; + rdfs:label "Test of sh:severity sh:Trace 005" ; + mf:action [ + sht:dataGraph <> ; + sht:shapesGraph <> ; + ] ; + mf:result [ + rdf:type sh:ValidationReport ; + sh:conforms "true"^^xsd:boolean ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode "Hello" ; + sh:resultSeverity sh:Trace ; + sh:sourceConstraintComponent sh:DatatypeConstraintComponent ; + sh:sourceShape ex:TestShape ; + sh:value "Hello" ; + ] ; + ] ; + mf:status sht:approved ; +. diff --git a/shacl12-vocabularies/shacl.ttl b/shacl12-vocabularies/shacl.ttl index 58c2f834..993da322 100644 --- a/shacl12-vocabularies/shacl.ttl +++ b/shacl12-vocabularies/shacl.ttl @@ -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 ;