Re: SHACL syntax and metamodel complexity

OK, here is Example 1.

Current syntax

ex:IssueShape a sh:Shape ;
  sh:scopeClass ex:Issue;
  sh:property [ sh:predicate ex:state ;
          sh:in (ex:unassigned ex:assigned) ;
   sh:minCount 1 ; sh:maxCount 1 ; ] ;
  sh:property [ sh:predicate ex:reportedBy ;
          sh:valueShape ex:UserShape ;
   sh:minCount 1 ; sh:maxCount 1 ; ] .
ex:UserShape a sh:Shape ;
  sh:property [ sh:predicate foaf:name ;
          sh:datatype xsd:string ;
   sh:minCount 1 ; sh:maxCount 1 ; ] ;
  sh:property [ sh:predicate foaf:mbox ;
  sh:nodeKind sh:IRI ;
  sh:minCount 1 ; ] .

Proposed syntax

ex:IssueShape a sh:Shape ;
  sh:scopeClass ex:Issue;
  sh:propValues ( ex:state
      [ sh:in (ex:unassigned ex:assigned) ;
       sh:minCount 1 ; sh:maxCount 1 ; ] ) ;
  sh:propValues ( ex:reportedBy
      [ sh:shape ex:UserShape ;
       sh:minCount 1 ; sh:maxCount 1 ; ] ) .
ex:UserShape a sh:Shape ;
  sh:propValues ( foaf:name
      [ sh:datatype xsd:string ;
       sh:minCount 1 ; sh:maxCount 1 ; ] ) ;
  sh:propValues ( foaf:mbox
      [ sh:nodeKind sh:IRI ;
       sh:minCount 1 ; ] ) .

I changed sh:fillers to sh:propValues based on comments from the working
group.  I don't like this name much but I haven't come up with a better one.

sh:propValues (was sh:fillers) is the replacement for sh:property and
sh:inverseProperty.  The replacement for sh:valueShape is sh:shape.

I'll add this example to the document I put on the wiki.

peter



> Peter,

> could you please post an example with the equivalent of sh:valueShape? e.g.
> example 1 from the spec.
> Looks like sh:fillers took that role but want to make sure I got this 100% >
right

Received on Friday, 11 March 2016 22:45:56 UTC