Re: Stem difference between ShEx and SHACL

On 26/10/2016 8:50, Eric Prud'hommeaux wrote:
> Stem in SHACL is a node constraint, e.g.
>    <FollupUp> [
>      ex:property ex:status;
>      sh:shape [ sh:or (
>        [ sh:in ( ex:skipped ex:lost ) ]
>        [ sh:stem ex:clinical ]
>        [ sh:stem ex:admin ] ) ] ]
>
>
>
> In ShEx it's used in a value set a la:
>
> ShEx:
>    <FollupUp> {
>      ex:status [ ex:skipped ex:lost ex:clinical~ ex:admin~ ]
>    }
>
> which would be nice in SHACL like this:
>
> SHACL:
>    <FollowUp> [
>      ex:property ex:status;
>      sh:shape [ sh:in (
>        ex:skipped ex:lost [ sh:stem ex:clinical~ ] [ sh:stem ex:admin~ ]
>      ) ] ]
>

Wouldn't this be merely syntactic sugar for an sh:or?

<FollowUp>
     ex:property ex:status ;
     sh:or (
         [
              sh:in ( ex:skipped ex:lost )
         ]
         [
             sh:stem "http://ex/clinical" ;
         ]
         [
             sh:stem "http://ex/admin" ;
         ]
     ) .

(Note that sh:stem currently only supports string values, and that you 
can skip the sh:shape node from the syntax.)

In either case, raising an ISSUE might be the best way forward if you 
want to see action.

Holger

Received on Tuesday, 25 October 2016 23:45:21 UTC