Quantcast
Channel: public-shacl Mail Archives
Viewing all articles
Browse latest Browse all 401

[data-shapes] Inconsistent definition of the set of Value Nodes of Property Shapes (#389)

$
0
0
simonstey has just created a new issue for https://github.com/w3c/data-shapes:

== Inconsistent definition of the set of Value Nodes of Property Shapes ==
https://w3c.github.io/data-shapes/shacl12-core/#value-nodes-property-shapes says:

>> #### 5.7.2 Value Nodes of Property Shapes
>> [](https://w3c.github.io/data-shapes/shacl12-core/#value-nodes-property-shapes#value-nodes-property-shapes)
>> For [property shapes](https://w3c.github.io/data-shapes/shacl12-core/#value-nodes-property-shapes#dfn-property-shapes) with a [value](https://w3c.github.io/data-shapes/shacl12-core/#value-nodes-property-shapes#dfn-values) for `sh:path` `p` the set of [value nodes](https://w3c.github.io/data-shapes/shacl12-core/#value-nodes-property-shapes#dfn-value-node) is produced by the following steps:
>> 1.  Add all [nodes](https://www.w3.org/TR/rdf12-concepts/#dfn-node) in the [data graph](https://w3c.github.io/data-shapes/shacl12-core/#value-nodes-property-shapes#dfn-data-graphs) that can be reached from the [focus node](https://w3c.github.io/data-shapes/shacl12-core/#value-nodes-property-shapes#dfn-focus-node) with the [path mapping](https://w3c.github.io/data-shapes/shacl12-core/#value-nodes-property-shapes#dfn-path-mapping) of `p`.
> 2.  If `e` is the [value](https://w3c.github.io/data-shapes/shacl12-core/#value-nodes-property-shapes#dfn-values) of `sh:values` at the [property shape](https://w3c.github.io/data-shapes/shacl12-core/#value-nodes-property-shapes#dfn-property-shapes), then add the [output nodes](https://w3c.github.io/data-shapes/shacl12-core/#value-nodes-property-shapes#dfn-output-nodes) of `evalExpr(e, [data graph](https://w3c.github.io/data-shapes/shacl12-core/#value-nodes-property-shapes#dfn-data-graphs), [focus node](https://w3c.github.io/data-shapes/shacl12-core/#value-nodes-property-shapes#dfn-focus-node), {})`.
> 3.  If the set is still empty and `d` is the [value](https://w3c.github.io/data-shapes/shacl12-core/#value-nodes-property-shapes#dfn-values) of `sh:defaultValue` at the [property shape](https://w3c.github.io/data-shapes/shacl12-core/#value-nodes-property-shapes#dfn-property-shapes), then add the [output nodes](https://w3c.github.io/data-shapes/shacl12-core/#value-nodes-property-shapes#dfn-output-nodes) of `evalExpr(d, [data graph](https://w3c.github.io/data-shapes/shacl12-core/#value-nodes-property-shapes#dfn-data-graphs), [focus node](https://w3c.github.io/data-shapes/shacl12-core/#value-nodes-property-shapes#dfn-focus-node), {})`.

Which I read as `value nodes = [nodes reachable via path] ∪ [output nodes of evaluating the NExp of sh:values] ∪ [|1| + |2| = 0 -> [output nodes of evaluating the NExp of sh:defaultValue]] ` 

So if a Property Shape has both a `sh:path` and `sh:values` it uses the nodes from both as value nodes. 

However, in https://w3c.github.io/data-shapes/shacl12-core/#property-shapes#property-shapes it says:

>> A property shape is a [shape](https://w3c.github.io/data-shapes/shacl12-core/#property-shapes#dfn-shape) in the [shapes graph](https://w3c.github.io/data-shapes/shacl12-core/#property-shapes#dfn-shapes-graphs) that is the [subject](https://www.w3.org/TR/rdf12-concepts/#dfn-subject) of a [triple](https://www.w3.org/TR/rdf12-concepts/#dfn-rdf-triple) that has `sh:path` as its [predicate](https://www.w3.org/TR/rdf12-concepts/#dfn-predicate). A shape has at most one [value](https://w3c.github.io/data-shapes/shacl12-core/#property-shapes#dfn-values) for `sh:path`. The [value](https://w3c.github.io/data-shapes/shacl12-core/#property-shapes#dfn-values) of `sh:path` in a property shape is a [well-formed](https://w3c.github.io/data-shapes/shacl12-core/#property-shapes#dfn-well-formed) [SHACL property path](https://w3c.github.io/data-shapes/shacl12-core/#property-shapes#dfn-shacl-property-paths).  
>> It is recommended, but not required, for a [property shape](https://w3c.github.io/data-shapes/shacl12-core/#property-shapes#dfn-property-shapes) to be declared as a [SHACL instance](https://w3c.github.io/data-shapes/shacl12-core/#property-shapes#dfn-shacl-instance) of `sh:PropertyShape`. [SHACL instances](https://w3c.github.io/data-shapes/shacl12-core/#property-shapes#dfn-shacl-instance) of `sh:PropertyShape` have one [value](https://w3c.github.io/data-shapes/shacl12-core/#property-shapes#dfn-values) for the property `sh:path`.  
>> A [property shape](https://w3c.github.io/data-shapes/shacl12-core/#property-shapes#dfn-property-shapes) has at most one [value](https://w3c.github.io/data-shapes/shacl12-core/#property-shapes#dfn-values) for the property `sh:values` and this [value](https://w3c.github.io/data-shapes/shacl12-core/#property-shapes#dfn-values) is a [well-formed](https://w3c.github.io/data-shapes/shacl12-core/#property-shapes#dfn-well-formed) [node expression](https://w3c.github.io/data-shapes/shacl12-core/#property-shapes#dfn-node-expression). A [property shape](https://w3c.github.io/data-shapes/shacl12-core/#property-shapes#dfn-property-shapes) has at most one [value](https://w3c.github.io/data-shapes/shacl12-core/#property-shapes#dfn-values) for the property `sh:defaultValue` and this [value](https://w3c.github.io/data-shapes/shacl12-core/#property-shapes#dfn-values) is a [well-formed](https://w3c.github.io/data-shapes/shacl12-core/#property-shapes#dfn-well-formed) [node expression](https://w3c.github.io/data-shapes/shacl12-core/#property-shapes#dfn-node-expression). A [property shape](https://w3c.github.io/data-shapes/shacl12-core/#property-shapes#dfn-property-shapes) can only have [values](https://w3c.github.io/data-shapes/shacl12-core/#property-shapes#dfn-values) for `sh:values` and/or `sh:defaultValue` when its [value](https://w3c.github.io/data-shapes/shacl12-core/#property-shapes#dfn-values) for `sh:path` is a [Predicate Path](https://w3c.github.io/data-shapes/shacl12-core/#property-shapes#property-path-predicate).
>> Informally, property shapes specify constraints that need to be met with respect to [nodes](https://www.w3.org/TR/rdf12-concepts/#dfn-node) that can be reached from the [focus node](https://w3c.github.io/data-shapes/shacl12-core/#property-shapes#dfn-focus-node) **by either:**
>> (a) directly following a given property (specified as an [IRI](https://www.w3.org/TR/rdf12-concepts/#dfn-iri)), 
>> (b) directly following any other [SHACL property path](https://w3c.github.io/data-shapes/shacl12-core/#property-shapes#dfn-shacl-property-paths) (specified using `sh:path`), 
>> (c) evaluating the node expression (specified using `sh:values`), or, 
>> (d) if no other values exist, evaluating the node expression (specified using `sh:defaultValue`).

so EITHER a OR b OR c OR d 


and `either or` according to https://dictionary.cambridge.org/dictionary/english/either-or means:

> used to refer to a [situation](https://dictionary.cambridge.org/dictionary/english/situation) in which there is a [choice](https://dictionary.cambridge.org/dictionary/english/choice) between two different [plans](https://dictionary.cambridge.org/dictionary/english/plan) of [action](https://dictionary.cambridge.org/dictionary/english/action), **but both together are not [possible](https://dictionary.cambridge.org/dictionary/english/possible):**

so which is it?

Please view or discuss this issue at https://github.com/w3c/data-shapes/issues/389 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Viewing all articles
Browse latest Browse all 401

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>