diff --git a/shacl12-core/index.html b/shacl12-core/index.html index 80fc79a1..750ac581 100644 --- a/shacl12-core/index.html +++ b/shacl12-core/index.html @@ -2591,8 +2591,6 @@
sh:values
and sh:defaultValue
to derive the value nodes of a property shape.sh:targetNode
to dynamically compute the targets of a shape.sh:nodeByExpression
to validate nodes against a dynamically computed set of node shapes.sh:expression
to validate nodes against a condition.sh:deactivated
to deactivate certain shapes under specific conditions.@@ -6812,238 +6810,6 @@
- sh:nodeByExpression
specifies the condition that each value node conforms to the
- node shapes produced by a node expression.
- The evaluation of these node expressions is repeated for all value nodes of the shape
- as the focus node.
-
- Constraint Component IRI: sh:NodeByExpressionConstraintComponent
-
Property | -Summary and Syntax Rules | -
---|---|
sh:nodeByExpression |
-
- The node shapes that all value nodes need to conform to.
- The values of sh:nodeByExpression in a shape must be well-formed node expressions.
- |
-
$expr
be a value of sh:nodeByExpression
.
-For each value node v
: perform a conformance check of
-v
against each output node of evalExpr(expr,
-data graph, v, {})
s
. A failure
-MUST be produced if the conformance check of v
against
-s
produces a failure. Otherwise, if v
does
-not conform to s
, there is a validation result
-with v
as sh:value
and a deep copy of
-s
as sh:sourceConstraint
.
- The remainder of this section is informative.
-
- sh:nodeByExpression
functions similarly to sh:node
, but instead of referencing a fixed node shape,
- a referenced node expression is used to dynamically compute the set of node shapes to which each value node must conform.
-
- There are three key differences between sh:nodeByExpression
and sh:node
:
-
sh:nodeByExpression
references a node expression instead of a fixed node shape as sh:node
does.
- sh:nodeByExpression
cannot reference a node shape that is a blank node as a value like sh:node
can,
- as a blank node would be interpreted as a node expression.
- sh:nodeByExpression
additionally include a value for `sh:sourceConstraint`.
-
- Note that sh:node
and sh:nodeByExpression
exhibit the same behavior when given a value that is an IRI of a node shape.
- In this case, sh:node
directly validates against the specified node shape, whereas sh:nodeByExpression
interprets the IRI
- as an IRI expression that evaluates to a set containing the same node shape.
-
- In the following example, all values of the property ex:address
must fulfill the
- constraints expressed by the shape ex:AddressShape
.
-
- Based on node expressions, this section introduces a constraint component called
- expression constraints.
- Expression constraints can be used in any shape to declare the condition that the
- node expression specified via sh:expression
has true
as its only output node.
- The evaluation of these node expressions is repeated for all value nodes of the shape
- as the focus node.
-
- Constraint Component IRI: sh:ExpressionConstraintComponent
-
Property | -Summary and Syntax Rules | -
---|---|
sh:expression |
-
- The node expression that must return true .
- The values of sh:expression at a
- shape must be well-formed node expressions.
- |
-
$expr
be a value of sh:expression
.
- For each value node v
- where evalExpr(expr, data graph, v, {})
- does not return the list consisting of exactly true
as its output nodes,
- there is a validation result that has v
as its sh:value
- and a deep copy of $expr
in the results graph as its sh:sourceConstraint
.
- If the $expr
has values for sh:message
in the shapes graph,
- then these values become the (only) values for sh:resultMessage
in the
- validation result.
- sh:singleLine
, see Issue 177sh:ShapeClass
for implicit class targets; see Issue 212sh:expression
; see Issue 357sh:nodeByExpression
, see Issue 408sh:ByTypes
for sh:closed
; see Issue 172sh:class
and sh:datatype
can now also be lists, indicating a union of choices; see Issue 160skos:
http://www.w3.org/2004/02/skos/core#
sparql:
http://www.w3.org/ns/sparql#
xsd:
http://www.w3.org/2001/XMLSchema#
+ This section introduces SHACL constraint components that operate on node expressions. +
+ +
+ Based on node expressions, this section introduces a constraint component called
+ expression constraints.
+ Expression constraints can be used in any shape to declare the condition that the
+ node expression specified via sh:expression
has true
as its only output node.
+ The evaluation of these node expressions is repeated for all value nodes of the shape
+ as the focus node.
+
+ Constraint Component IRI: sh:ExpressionConstraintComponent
+
Property | +Summary and Syntax Rules | +
---|---|
sh:expression |
+
+ The node expression that must return true .
+ The values of sh:expression at a
+ shape must be well-formed node expressions.
+ |
+
$expr
be a value of sh:expression
.
+ For each value node v
+ where evalExpr(expr, data graph, focusNode, {value: v})
+ does not return the list consisting of exactly true
as its output nodes,
+ there is a validation result that has v
as its sh:value
+ and a deep copy of $expr
in the results graph as its sh:sourceConstraint
.
+ The remainder of this section is informative.
+
+ Note that the scope in the evaluation of expression constraints contains the variable value
+ for the current value node while the variable focusNode
is the focus node.
+
+ The following example uses some SPARQL-based node expressions to declare
+ the constraint that the values of ex:ibanNumber
must start with the same two (upper-case) letters as
+ the values of the path ex:country/ex:code
.
+
+ sh:nodeByExpression
specifies the condition that each value node conforms to the
+ node shapes produced by a node expression.
+ The evaluation of these node expressions is repeated for all value nodes of the shape
+ as the focus node.
+
+ Constraint Component IRI: sh:NodeByExpressionConstraintComponent
+
Property | +Summary and Syntax Rules | +
---|---|
sh:nodeByExpression |
+
+ The node shapes that all value nodes need to conform to.
+ The values of sh:nodeByExpression in a shape must be well-formed node expressions.
+ |
+
$expr
be a value of sh:nodeByExpression
.
+ For each value node v
: perform a conformance check of
+ v
against each output node of evalExpr(expr,
+ data graph, v, {})
s
. A failure
+ MUST be produced if the conformance check of v
against
+ s
produces a failure. Otherwise, if v
does
+ not conform to s
, there is a validation result
+ with v
as sh:value
and a deep copy of
+ s
as sh:sourceConstraint
.
+ The remainder of this section is informative.
+
+ sh:nodeByExpression
functions similarly to sh:node
, but instead of referencing a fixed node shape,
+ a referenced node expression is used to dynamically compute the set of node shapes to which each value node must conform.
+
+ There are three key differences between sh:nodeByExpression
and sh:node
:
+
sh:nodeByExpression
references a node expression instead of a fixed node shape as sh:node
does.
+ sh:nodeByExpression
cannot reference a node shape that is a blank node as a value like sh:node
can,
+ as a blank node would be interpreted as a node expression.
+ sh:nodeByExpression
additionally include a value for `sh:sourceConstraint`.
+
+ Note that sh:node
and sh:nodeByExpression
exhibit the same behavior when given a value that is an IRI of a node shape.
+ In this case, sh:node
directly validates against the specified node shape, whereas sh:nodeByExpression
interprets the IRI
+ as an IRI expression that evaluates to a set containing the same node shape.
+
+ The following example demonstrates how sh:nodeByExpression
could be used in the context of the W3C Data Cube Vocabulary.
+ Building upon examples 5 and 6 from the Data Cube Vocabulary documentation, Data Structure Definition is extended with the property eg:hasShape
,
+ which links to an associated node shape to which relevant qb:Observation
instances must conform.
+ To validate that every qb:Observation
instance conforms to the appropriate shape, sh:nodeByExpression
with a Path Expression
+ is used to locate the shape at the property path qb:dataSet/qb:structure/eg:hasShape
from each qb:Observation
instance.
+
TODO
@@ -2119,7 +2669,8 @@TODO