Re: How to do repetition in SHACL

[I was going to send this message out before the revised version, but somehow
the message didn't make it out so I'm sending it out, with an addendum.]

Yes, there is a glitch in the last bit.  It's more serious than just using
maxCount instead of qualifiedMaxCount.  (In fact, there may still be a glitch
in the revised version.)

peter

On 09/09/2015 04:03 AM, Holger Knublauch wrote:
> 
> 
> On 9/9/15 8:50 PM, Peter F. Patel-Schneider wrote:
>> We want a shape that is satisfied (i.e., not violated) by nodes that have
>> between nc and mc values (including unbounded) for ex:p that satisfy shape C
>> and between nb and mb values (including unbounded) for ex:p that satisfy
>> shape B and no other values for ex:p.  Further there are no nodes that can
>> satisfy both C and B.
>>
>> This can be done with the following SHACL shape:
>>
>> S rdf:type sh:Shape ;
>>    sh:property [ sh:predicate ex:p ;
>>         sh:qualifiedValueShape C ;
>>                  sh:qualifiedMinCount nc ;
>>           sh:qualifiedMaxCount mc ] ;
>>    sh:property [ sh:predicate ex:p ;
>>         sh:qualifiedValueShape B ;
>>                  sh:qualifiedMinCount nb ;
>>           sh:qualifiedMaxCount mb ] ;
>>    sh:property [ sh:predicate ex:p ;
>>         sh:valueShape [ rdf:type sh:Shape ;
>>                       sh:constraint [ rdf:type sh:OrConstraint ;
>>                               sh:shapes ( C B ) ] ] ] .
>>
>> If the "no other values for ex:p" is not wanted, then the last constraint is
>> removed.
>>
>> If C and B are not disjoint, then the constraint
>>
>>    sh:property [ sh:predicate ex:p ;
>>         sh:valueShape [ rdf:type sh:Shape ;
>>                       sh:constraint [ rdf:type sh:AndConstraint ;
>>                               sh:shapes ( C B ) ] ] ;
>>         sh:maxCount 0 ]
> 
> Did you mean sh:qualifiedMaxCount here? Above, the sh:valueShape and
> sh:maxCount are independent, and maxCount will overrule the other constraint.
> 
> Holger
> 
> 
>>
>> is added.
>>
>> NB:  None of this has been checked against a SHACL implementation, so the
>> syntax might not be completely correct.
>>
>>
>>
>> peter
>>
> 
> 

Received on Wednesday, 9 September 2015 11:59:22 UTC