- From: Holger Knublauch <holger@topquadrant.com>
- Date: Sat, 18 Jun 2016 09:02:26 +1000
- To: public-data-shapes-wg@w3.org
- Message-ID: <5f1eea6c-8434-add0-4358-f80781676051@topquadrant.com>
On 18/06/2016 4:47, Karen Coyle wrote: > Interesting. Can you point out where this is explained in the spec? - kc In the beginning of section 4, when you scroll down to the definition of value nodes: * Fornode constraints <http://w3c.github.io/data-shapes/shacl/#dfn-node-constraints>thevalue nodesare the individualfocus nodes <http://w3c.github.io/data-shapes/shacl/#dfn-focus-node>, forming a set of exactly one node. The spec doesn't have to be written that way, and there are arguments in favor of changing it so that it applies to - either all scope nodes (when called from the top-level) - or just the focus node (when called as nested shape, e.g. via sh:shape, sh:or) Maybe we can resolve this next week too. Holger > > On 6/17/16 10:22 AM, Irene Polikoff wrote: >> The way I understand it, when one uses scopeClass, the constraints apply >> to each SHACL instance of a class individually. For example, each >> instance >> of a Person can have only two parents. And a condition is tested against >> each node individually. >> >> This constraint, however, doesnąt apply to each instance >> individually. It >> is about the number of all instances. This is quite different, so I >> wouldnąt expect to use scopeClass. >> >> Irene >> >> >> >> >> >> >> On 6/17/16, 1:10 PM, "Karen Coyle" <kcoyle@kcoyle.net> wrote: >> >>> My preference overall would be to not use classes at all in validation; >>> to have all operations on triples, and rdf:type would be simply a >>> predicate like any other. (I believe that ShEx takes this approach.) >>> However, if you encourage people to view the objects of rdf:type as >>> classes, then you have to allow them to do so throughout, otherwise it >>> becomes difficult to explain "when is a class not a class?". >>> >>> With the solution in this proposal, we have what to the user is a class >>> but it does not use scopeClass, and scopeNode binds to the subject of a >>> triple, AFAI can determine. The below would not match the schema.org >>> example.[1] >>> >>> kc >>> [1] http://schema.org/FlightReservation >>> >>> >>> On 6/13/16 5:04 AM, RDF Data Shapes Working Group Issue Tracker wrote: >>>> shapes-ISSUE-168 (instance count): How to constrain number of >>>> instances >>>> of a class in a graph [SHACL - Core] >>>> >>>> http://www.w3.org/2014/data-shapes/track/issues/168 >>>> >>>> Raised by: Holger Knublauch >>>> On product: SHACL - Core >>>> >>>> There was recent discussion about how to specify min/max numbers of >>>> instances in a graph. Off-list I had also received a question from >>>> schema.org people about how to state that a graph/message must have >>>> exactly one instance of schema:FlightReservation, possibly to ensure >>>> that a graph has a starting point/root for validation. >>>> >>>> A possible syntax that would easily work with the current architecture >>>> could be >>>> >>>> ex:MyShape >>>> a sh:Shape ; >>>> sh:scopeNode schema:FlightReservation ; >>>> sh:constraint [ >>>> sh:minInstanceCount 1 ; >>>> sh:maxInstanceCount 1 ; >>>> ] . >>>> >>>> >>>> >>>> >>> >>> -- >>> Karen Coyle >>> kcoyle@kcoyle.net http://kcoyle.net >>> m: 1-510-435-8234 >>> skype: kcoylenet/+1-510-984-3600 >>> >> >> >> >
Received on Friday, 17 June 2016 23:03:00 UTC