Re: shapes-ISSUE-57 (labra): Grouping of Shapes [SHACL Spec]

I've saved this in case anyone ever asks me why we need a simpler 
version of the language.

kc

On 10/8/15 12:12 PM, Simon Steyskal wrote:
> Hi!
>
> as long as I haven't mixed something up wrt. the proposed feature of
> sh:NodeConstraints + under the assumption that sh:valueshape can be used
> in sh:nodeconstraints too, following shapes expressed in SHACL should be
> equivalent to your ShEx shapes ->
>
> ex:PersonShape
>      a sh:Shape ;
>      sh:constraint [
>          a sh:NodeConstraint ;
>          sh:valueShape [
>              sh:constraint [
>                  a sh:OrConstraint ;
>                  sh:shapes (
>                      [
>                          sh:property [
>                              sh:predicate ex:name ;
>                              sh:datatype xsd:string ;
>                          ]
>                      ]
>                      [
>                          sh:property [
>                              sh:predicate ex:firstname ;
>                              sh:minCount 1 ;
>                              sh:datatype xsd:string ;
>                          ] ;
>                          sh:property [
>                              sh:predicate ex:lastname ;
>                              sh:datatype xsd:string ;
>                          ]
>                      ]
>                  )
>              ]
>          ] ;
>          sh:maxCount 1 ;
>      ] ;
> .
>
> ex:ClosedIssueShape
>      a sh:Shape ;
>      sh:constraint [
>          a sh:NodeConstraint ;
>          sh:valueShape [
>              sh:constraint [
>                  a sh:OrConstraint ;
>                  sh:shapes (
>                      [
>                          sh:property [
>                              sh:predicate ex:resolution  ;
>                              sh:valueShape ex:RejectionShape ;
>                          ]
>                      ]
>                          sh:property [
>                              sh:predicate ex:rejection ;
>                              sh:valueShape ex:RejectionShape ;
>                          ]
>                      ]
>                  )
>              ]
>          ] ;
>          sh:minCount 1 ;
>      ] ;
> .
>
> ---
> DDipl.-Ing. Simon Steyskal
> Institute for Information Business, WU Vienna
>
> www: http://www.steyskal.info/  twitter: @simonsteys
>
> Am 2015-05-23 08:24, schrieb RDF Data Shapes Working Group Issue Tracker:
>> shapes-ISSUE-57 (labra): Grouping of Shapes [SHACL Spec]
>>
>> http://www.w3.org/2014/data-shapes/track/issues/57
>>
>> Raised by: Jose Emilio Labra Gayo
>> On product: SHACL Spec
>>
>> When combining Shapes with and and or operators, it is natural to
>> group those shapes. In compact syntax, grouping is represented by
>> parenthesis.
>>
>> For example:
>>
>> <PersonShape> {
>>   foaf:name xsd:string
>> | ( foaf:firstName xsd:string +
>>   , foaf:lastName xsd:String
>>   )
>> }
>>
>> A natural extension is to add cardinalities on those groups. SHACL
>> spec should define if groupings and cardinalities over groupings are
>> possible.
>
>

-- 
Karen Coyle
kcoyle@kcoyle.net http://kcoyle.net
m: 1-510-435-8234
skype: kcoylenet/+1-510-984-3600

Received on Wednesday, 14 October 2015 19:35:29 UTC