Not
Opened this issue · 0 comments
pkiraly commented
Not := shape:Shape
sh:not: Testing a Not parameter against a value node returns pass if validating shape against the value node returned fail, otherwise fail.
<Person> sh:property [ sh:predicate foaf:name; sh:nodeKind sh:Literal ] .
<Customer> sh:property [ sh:predicate corp:custId; sh:datatype xsd:integer ] .
<User> sh:constraint [ sh:not [ sh:or (<Person> <Customer>) ] ] .
<user1> foaf:name "Alice"; corp:custId 12 .
<user2> foaf:givenName "Bob"; corp:custId 34 .
<user2> foaf:name "Eve"; corp:custId 56.0 .
<user2> foaf:name [ rdfs:value "Bob" ]; corp:customerId 78.0 .
<User> <user1> pass foaf:name is an RDFLiteral and "12" is an xsd:integer.
<User> <user2> pass "34" is an xsd:integer.
<User> <user3> pass foaf:name is an RDFLiteral
<User> <user4> fail