diff --git a/shacl/index.html b/shacl/index.html index 2db9fd17..eddcfc43 100644 --- a/shacl/index.html +++ b/shacl/index.html @@ -639,7 +639,8 @@

SHACL Example

to suggest a human-readable name for the property when used in the inverse direction.

- SHACL validation based on the provided data graph and shapes graph would produce the following validation results: + SHACL validation based on the provided data graph and shapes graph would produce the following validation results. + See the section Validation Report for details on the format including the property sh:severity.

 [	a sh:ValidationResult ;
@@ -649,14 +650,14 @@ 

SHACL Example

sh:path ex:ssn ; sh:value "987-65-432A" ; sh:severity sh:Violation ; -] ; +] . [ a sh:ValidationResult ; sh:sourceConstraintComponent sh:MaxCountConstraintComponent ; sh:sourceShape ex:PersonShape ; sh:focusNode ex:Bob ; sh:path ex:ssn ; sh:severity sh:Violation ; -] ; +] . [ a sh:ValidationResult ; sh:sourceConstraintComponent sh:ClosedConstraintComponent ; sh:sourceShape ex:PersonShape ; @@ -760,17 +761,17 @@

Shapes

A node in the data graph that is validated against a shape is called a focus node.

- The set of focus nodes for a shape may be: -

- +

+ +

@@ -808,13 +809,11 @@

Targets

While targets define the starting points of the validation process, some shapes may validate -

- -

+

When multiple targets are provided in a shape, the target of a shape is the union of all nodes produced by these individual targets. @@ -1439,8 +1438,9 @@

Path (sh:path)

Value (sh:value)

- Validation results may have a value for the property sh:value pointing at a specific node that has caused the result. - For example, validation results produced as a result of a sh:nodeKind constraint use sh:value to point at the value node that does not have the correct node kind, + Validation results may have zero or one values for the property sh:value. + The object of a triple that has sh:value as its predicate and a validation result as its subject is the specific node that has caused the result. + For example, validation results produced as a result of a sh:nodeKind constraint use sh:value with the value node that does not have the correct node kind as its object, while results produced due to a sh:minCount violation do not use sh:value because there is no individual node that could be mentioned.

@@ -1514,6 +1514,7 @@

Declaring the Severity of a Constraint

 ex:MyShape
 	a sh:Shape ;
+	sh:targetNode ex:MyInstance ;
 	sh:property [
 		# Violations of either minCount and datatype are produced as warnings
 		sh:predicate ex:myProperty ;
@@ -1522,10 +1523,32 @@ 

Declaring the Severity of a Constraint

sh:severity sh:Warning ; ] ; sh:property [ - # The default severity is sh:Violation + # The default severity here is sh:Violation sh:predicate ex:myProperty ; - sh:maxCount 1 ; + sh:maxLength 10 ; ] .
+
+ex:MyInstance
+	ex:myProperty "http://toomanycharacters"^^xsd:anyURI .
+
+[
+	a sh:ValidationResult ;
+	sh:focusNode ex:MyInstance ;
+	sh:path ex:myProperty ;
+	sh:severity sh:Warning ;
+	sh:sourceConstraintComponent sh:DatatypeConstraintComponent ;
+	sh:sourceShape ex:MyShape ;
+	sh:value "http://toomanycharacters"^^xsd:anyURI ;
+] .
+[
+	a sh:ValidationResult ;
+	sh:focusNode ex:MyInstance ;
+	sh:path ex:myProperty ;
+	sh:severity sh:Violation ;
+	sh:sourceConstraintComponent sh:MaxLengthConstraintComponent ;
+	sh:sourceShape ex:MyShape ;
+	sh:value "http://toomanycharacters"^^xsd:anyURI ;
+] .