W3C home > Mailing lists > Public > public-rdf-shapes@w3.org > February 2017

Re: SHACL draft ready for review

From: Olivier Corby <olivier.corby@inria.fr>
Date: Tue, 7 Feb 2017 09:30:35 +0100
To: public-rdf-shapes@w3.org
Message-ID: <589985AB.7020209@inria.fr>

Some comments abouthttp://w3c.github.io/data-shapes/shacl/



1.1 Terminology

if there is no rule to make *a* some situation true

SHACL supports a subset of the property path *syntax* from SPARQL 1.1

-- not  syntax but language (or expressions)


and the list does not have itself as a value of the property path rdf:rest+ in G.

-- and rdf:first ?

SHACL type

-- is it a set ?

Nodes in an RDF graph that are subclasses, superclasses, or types of nodes in the graph are *often* referred to as SHACL class.


I would use SHACL SPARQL without "-"

In the introduction I would add :

The syntax of SHACL is RDF,  Turtle syntax is used in this document.
Other RDF syntax can be used as well: RDF/XML, JSON-LD.

Validation report :
results are blank nodes, are  URI  possible ?
What when result value is a bnode ?

2. Shapes and Constraints

A sentence would be welcome to talk about SHACL and OWL:

sh:targetClass : rdfs:Class
What about owl:Class and OWL entailment ?

what about cardinality constraints in presence of owl:sameAs and OWL entailment
what about owl:equivalentClass, owl:equivalentProperty ?

sh:targetObjectsOf : rdf:Property
What about owl:ObjectProperty, owl:DatatypeProperty

2.1.1 Constraints, Parameters and Constraint Components

Why not just Constraint  and not both Constraints and Constraint Components

The distinction between Shape, Constraint and Constraint Component is not simple

A shape in a shapes graph declares a constraint of *type* c

-- is it rdf:type ?

I would add a sentence to state that the validation process starts with shapes with targets. Node targets (sh:targetNode)

Each value of sh:targetNode is either an IRI or a literal.
-- contradicts sh:targetNode any (in 2. Shapes and Constraints) Class-based Targets (sh:targetClass)

sh:targetClass may tolerate bnode for future use with OWL ?
sh:targetClass [ owl:intersectionOf ex:A ex:B ] Implicit Class Targets

unclear with  sh:PropertyShape
give an example and an explanation

Any IRI can be used as a severity.
-- including user defined URI in the shacl sh: namespace ?

sh:sourceShape ... blank node above ... ;

use an explicit bnode ID instead (e.g. _:b1)

2.2 Node Shapes

sh:NodeShape is the class of node shapes and should be declared as a type for shapes that are IRIs.
-- What about bnodes ?

However, the presence of any rdf:type triple does not determine whether a node is treated as a node shape or not.
-- This is weird

2.3 Property Shapes

Informally, property shapes specify constraints that need to be met with respect to nodes that can be reached from the focus node either by directly following a given property (specified as an IRI*)* or any other SHACL property path*,* specified using sh:path.

sh:PropertyShape is the class of property shapes and should be declared as a type for shapes that are IRIs. However, the presence of any rdf:type triple does not determine whether a node is treated as a property shape or not.
-- This is weird Sequence Paths

If p is a sequence path in G with list members v1, v2, ..., vn then path(p,G) is a SPARQL SequencePath of path(v1,G) as elt1, and the results of the path mapping of the list node of *v2 ..vn* as elt2.

3.2 Data Graph

SHACL makes no assumptions about whether a graph contains triples that are entailed from the graph under any RDF entailment regime.

-- What about OWL entailment ?

3.6 Validation Report

Note that *although* this specification only covers the case in which the validation report must include all validation results.

When source shape is a bnode, what value for sh:sourceShape is in the report   ?
Same for sh:resultPath

a validation report has *one or several value(s)* for the property sh:result.

Can result have URI instead of bnode ? Path (sh:resultPath)

Validation results may have a value for the property sh:resultPath pointing at a well-formed property path starting with the given sh:focusNode.

-- "starting with the given sh:focusNode" is not clear

For results produced by a property shape, this path is equivalent to the value of sh:path of the shape.

-- do we need to duplicate the whole path or just put the bnode of the path ?

4. Core Constraint Components

All constraint components can be used both in property shapes and node shapes.
-- This is weird, why are there two classes of shapes ?

4.1.1 sh:class

-- if there are several values for sh:class, it is a conjunction

4.2 Cardinality Constraint Components

What if owl:sameAs with OWL entailment regime ?

sh:disjoint specifies the condition that the set of value nodes is disjoint with *the the*

4.6.3 sh:or

a sh:NodeShape ;
sh:targetNode ex:Bob ;
sh:or (
         sh:path ex:firstName ;
         sh:minCount 1 ;
         sh:path ex:givenName ;
         sh:minCount 1 ;
) .

-- as in xor example, syntax should be :

a sh:NodeShape ;
sh:targetNode ex:Bob ;
sh:or (
     [sh:property [
         sh:path ex:firstName ;
         sh:minCount 1 ;
     [sh:property [
         sh:path ex:givenName ;
         sh:minCount 1 ;
) .

Can sh:qualifiedValueShape be used with boolean connector and or not xor ?
e.g. :

a sh:NodeShape ;
sh:targetNode ex:QualifiedValueShapeExampleValidResource ;
sh:property [
     sh:path ex:parent ;
     sh:minCount 2 ;
     sh:maxCount 2 ;
     sh:qualifiedValueShape [
         sh:path ex:pp ;
         sh:or ([sh:hasValue ex:xx] [sh:class ex:cc])
     ] ;
     sh:qualifiedMinCount 1 ;
] .

There is no systematic definition of the places where we can use  boolean connectors: and or not xor.

There is no systematic definition of sh:qualifiedValueShapesDisjoint

4.8 Other Constraint Components

This section enumerates Core constraint components that *did* not fit into the other categories.

-> do not fit

4.8.1 sh:closed, sh:ignoredProperties

If $closed is true then a validation result must be produced for each triple that has a value node as its subject and a predicate that is not explicitly enumerated as a sh:path in any of the property shapes declared via sh:property at the current shape.

-- With property paths, e.g.:
sh:path (ex:p1 ex:p2)
sh:path [ sh:alternativePath (ex:p1 ex:p2) ]
do the properties (i.e. ex:p1 and ex:p2)  participate to the definition of sh:closed ?

D. Summary of SHACL Core Validators

sh:qualifiedValueShapesDisjoint is missing

Received on Tuesday, 7 February 2017 08:31:16 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:02:48 UTC