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

Re: ACTION: ericP to send proposal for sh:Stem in response to ISSUE-80

From: Holger Knublauch <holger@topquadrant.com>
Date: Fri, 1 Apr 2016 09:34:08 +1000
To: public-data-shapes-wg@w3.org
Message-ID: <56FDB3F0.9070103@topquadrant.com>
+1 to Dimitris comment on using the current syntax (I strongly object to 
Peter's list-based syntax).

On 1/04/2016 1:55, Peter F. Patel-Schneider wrote:
> On 03/30/2016 03:03 PM, Eric Prud'hommeaux wrote:
>
>> PROPOSAL: write stems in shacl like:
>>
>> <http://a.example/S1> a sh:Shape;
>>     sh:propValues (
>>       <http://a.example/p1> [
>>         sh:values [
>>           a sh:StemRange;
>>           shex:stem <http://a.example/v>
>>         ]
>>       ]
>>     ).
>>
>> This matches { <s1> <http://a.example/p1> <http://a.example/v123> }
>>           and { <s1> <http://a.example/p1> <http://a.example/v> }
>>     but fails { <s1> <http://a.example/p1> <http://a.example/uv> }
> The following syntax might be better:
>
> ex:S1 a sh:Shape;
>     sh:propValues (
>       <http://a.example/p1>
>       [ a sh:Shape ;
>         sh:stem <http://a.example/v>
>       ] ) .
>
> or, in the current SHACL syntax:
>
> ex:S1 a sh:Shape;
>     sh:property
>       [ a sh:Shape ;
>         sh:predicate <http://a.example/p1> ;
>         sh:stem <http://a.example/v>
>       ].
>
> I appears to me that this is equivalent to
>
> ex:S1 a sh:Shape;
>      sh:property
>        [ a sh:Shape ;
>          sh:predicate <http://a.example/p1> ;
>          sh:nodeKind sh:IRI ;
>          sh:pattern "^http://a.example/v"
>        ].
>
>
>> PROPOSAL: write exclusions in shacl like:
>>
>> <http://a.example/S1> a sh:Shape;
>>     sh:propValues (
>>       <http://a.example/p1> [
>>         sh:values [
>>           a sh:StemRange;
>>           shex:stem <http://a.example/v>
>>           sh:exclusions: (
>>             [ "type": "Stem", "stem": <http://a.example/v1> ],
>>             [ "type": "Stem", "stem": <http://a.example/v2> ],
>>             [ "type": "Stem", "stem": <http://a.example/v3> ]
>>           )
>>         ]
>>       ]
>>     ).
>>
>> This matches { <s1> <http://a.example/p1> <http://a.example/v4> }
>>           and { <s1> <http://a.example/p1> <http://a.example/v456> }
>>     but fails { <s1> <http://a.example/p1> <http://a.example/v2> }
>>           and { <s1> <http://a.example/p1> <http://a.example/v234> }
> It appears to me that this is equivalent to
>
> ex:S1 a sh:Shape;
>    sh:propValues ( <http://a.example/p1>
>      [ a sh:Shape ;
>        sh:nodeKind sh:IRI ;
>        sh:pattern "^http://a.example/v" ;
>        sh:not [ a sh:Shape ; sh:pattern "^http://a.example/v1" ] ;
>        sh:not [ a sh:Shape ; sh:pattern "^http://a.example/v2" ] ;
>        sh:not [ a sh:Shape ; sh:pattern "^http://a.example/v3" ]
>      ] ) .
>
> (because of the repeated sh:not the current syntax for this would be quite large).

I had raised an issue recently to discuss whether we want to allow 
multiple sh:not values, and I am OK with such use cases too.

Holger


>
>
>>> You can find the stem tests in <http://raw.githubusercontent.com/shexSpec/shexTest/master/validation/manifest.ttl> with
>>>
>>>    SELECT * { ?s <http://www.w3.org/ns/shacl/test-suite#trait> <http://www.w3.org/ns/shacl/test-suite#Stem> }
>>>
>>> Gotta put my child to bed. will try to write to formalize later.
>>> -- 
>>> -ericP
Received on Thursday, 31 March 2016 23:34:39 UTC

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