- From: Peter F. Patel-Schneider <pfpschneider@gmail.com>
- Date: Tue, 3 May 2016 14:20:17 -0700
- To: Dimitris Kontokostas <kontokostas@informatik.uni-leipzig.de>
- Cc: Karen Coyle <kcoyle@kcoyle.net>, public-data-shapes-wg <public-data-shapes-wg@w3.org>
It is indeed the case that Section 4 is too late to set the stage for scopes and filters and focus nodes. The problem is, I think, that the term "focus nodes" is being used for both the nodes that pass the scopes of a shape and the nodes that also pass the filters of a shape. The different kinds of constraints exacerbates the problem because there is "value nodes" to consider as well. It might be possible to recast everything in Section 3 to be about the validation of a node in the data graph, i.e., removing all talk of focus nodes. This makes sense because constraint components don't have anything to do with focus node selection. Then Section 2 and Section 4 could be rewritten to remove procedural connotations and forward references. peter On 05/03/2016 12:55 PM, Dimitris Kontokostas wrote: > > > On Tue, May 3, 2016 at 4:34 PM, Peter F. Patel-Schneider > <pfpschneider@gmail.com <mailto:pfpschneider@gmail.com>> wrote: > > I think that part of the problem is that scopes and filters, and indeed the > whole notion of just how validation works, are badly defined. When are scopes > used? Is it the case that filters are always used to cut down on the nodes > that are validated by constraints? It is difficult to determine answers to > these questions from the spec. > > Here are some bits of the spec that show how bad this is currently done. > > Section 2. > The set of focus nodes may be defined explicitly in a shape using scopes and > filter shapes, or provided by the validation engine as defined in later > sections. Shape scopes define the selection criteria for the focus nodes. > Shapes with scopes MAY additionally provide filter shapes. Filter shapes > further refine the focus nodes to the ones that conform to a set of filter > shapes. > > Section 2.1 > Scopes define the set of focus nodes for a shape and SHACL provides three > scope types: > Node scopes define a specific RDF node as scope. > Class-based scopes define the scope as the set of all instances of a > class. > General scopes are a flexible mechanism to define arbitrary focus nodes. > When multiple scopes are provided in a shape, the scope of a shape is the > union of all focus nodes produced by these scopes. Focus nodes produced by > scopes might not exist in the data graph. > > Section 2.2 > A filter shape can further refine the scope of a focus node. [...] > Formally, filter shapes eliminate entries from the collection of focus nodes > selected by a shape's scopes, [...] > > Section 3. > For property constraints the value nodes are the objects of the triples > that have the focus node as subject and the given property as predicate. [...] > For inverse property constraints the value nodes are the subjects of the > triples that have the focus node as object and the given property as > predicate. [...] > For node constraints the value nodes are the individual focus nodes, > forming a set of exactly one node. > > There needs to be some place that lays out how SHACL validation actually > works. > > > I also saw this problem and that is why we added section 4 (validation and > graphs). > The problem is that this section comes too late but we also need to define > some terms in advance so it is like a chicken and egg problem. > > If you think that section 4 goes into the right direction we welcome any > feedback on how it can be restructured or be rearranged in earlier / later > sections > > Dimitris
Received on Tuesday, 3 May 2016 21:20:47 UTC