pkiraly/metadata-qa-api

Or

Opened this issue · 0 comments

Or := shapes:Set[Shape]

sh:or: Testing an Or parameter against a value node returns fail if validating each member of the set shapes against the value node returned fail, otherwise pass.

<Person> sh:property [ sh:predicate foaf:name; sh:nodeKind sh:Literal; sh:minCount 1 ] .
<Customer> sh:property [ sh:predicate corp:custId; sh:datatype xsd:integer ] .
<User> sh:constraint [ 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
<User>  <user2>  pass
<User>  <user3>  pass
<User>  <user4>  fail  no foaf:name supplied and "78.0" is an xsd:double.