W3C home > Mailing lists > Public > public-data-shapes-wg@w3.org > May 2016

Re: Simplification of scopes section (see also ISSUE-148)

From: Holger Knublauch <holger@topquadrant.com>
Date: Sun, 15 May 2016 11:04:01 +1000
To: public-data-shapes-wg@w3.org
Message-ID: <4b30a9bb-9105-9ecf-065a-176fc3e8a39b@topquadrant.com>
On 14/05/2016 14:22, Karen Coyle wrote:
> Looking at this:
>
> On 5/13/16 5:23 PM, Holger Knublauch wrote:
>> ex:MyShape
>>      a sh:Shape ;
>>      rdfs:comment "every dct:subject must have IRIs as objects" ;
>>      sh:scopeProperty dct:subject ;
>>      sh:property [
>>          sh:predicate dct:subject ;
>>          sh:nodeKind sh:IRI ;
>>      ] .
>
> There is 100% redundancy between sh:scopeProperty and the constraint. 
> If I were to state what I want to do in terms of validation, it would 
> come out like this:
>
>
> ex:MyShape
>     a sh:Shape ;
>     rdfs:comment "every dct:subject must have IRIs as objects" ;
>     sh:property [
>         sh:predicate dct:subject ;
>         sh:nodeKind sh:IRI ;
>     ] .
>
> because I am not using a scope at all. What this means is what is in 
> the comment. A scope, logically, is a selection from the data graph, 
> but this use case makes no such selection, and the constraint is 
> sufficient.
>
> Is there a use of scopeProperty that would not be redundant?

Yes. For example "every ex:startDate must be accompanied by a ex:endDate":

ex:MyShape
     a sh:Shape ;
     sh:scopeProperty ex:startDate ;
     sh:property [
         sh:predicate ex:endDate ;
         sh:minCount 1 ;
     ] .

Holger
Received on Sunday, 15 May 2016 01:04:36 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:30:33 UTC