sh:maxCount set to zero

15 views
Skip to first unread message

Jan Voskuil

unread,
Mar 16, 2021, 9:05:59 AM3/16/21
to TopBraid Suite Users
Hey,
For a particular node shape I would like to make sure that instances of it do not have values for a particular property (but without closing the shape). So I wrote:

ex:MyNode
  a rdfs:Class, sh:NodeShape ;
  sh:property [
    sh:path ex:someProp ;
   sh:maxCount 0 ;
  ]
.

This is ignored in the TBCME validator. That is, the following data passes without validation results:

ex:anIndividual
  a ex:MyNode  ;
  ex:someProp "a"  ;
  ex:someProp "b"  ;
.

When I set sh:maxCount to 1, it throws an error. But not when I set it to 0.

Is this expected behavior? The spec doesn't say anything about this. On the other hand, it does say something about when sh:minCount is set to zero: "If the minimum cardinality value is 0 then this constraint is always satisfied and so may be omitted." Given this, I would expect the same, mutatis mutandis, with maximum cardinality. Any thoughts would be appreciated. Best regards, -j

Irene Polikoff

unread,
Mar 16, 2021, 10:48:29 AM3/16/21
to topbrai...@googlegroups.com
Hmm… I can’t reproduce. Can you send your example?


And in TBC



--
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/876343cf-af88-487d-80e9-c201b3e98bffn%40googlegroups.com.

Jan Voskuil

unread,
Mar 17, 2021, 11:48:27 AM3/17/21
to topbrai...@googlegroups.com

Thanks, this at least confirms I didn’t misread the spec. Maybe this is a workspace thing. I have a very bloated workspace running 6.4. I’ll send the files separately. Thanks, -j

Reply all
Reply to author
Forward
0 new messages