w3c / shacl

SHACL Community Group (Post-REC activitities)
27 stars 4 forks source link

Logical Constraint Components with multiple SHACL lists are underspecified #41

Open bergos opened 4 months ago

bergos commented 4 months ago

The specification isn't clear about what an implementation should do if a shape has multiple lists of logical constraint components of the same type. The following example could be interpreted as

  1. (shapeA || shapeB) && (shapeC || shapeD)
  2. shapeA || shapeB || shapeC || shapeD
ex:shapeRoot a sh:NodeShape;
  sh:or
    (ex:shapeA ex:shapeB),
    (ex:shapeC ex:shapeD).

It looks like most implementations use option 2, but it should be written more clearly in the specification.

HolgerKnublauch commented 4 months ago

All constraints in SHACL eventually get ANDed for execution, i.e. the correct interpretation is 1. The target nodes need be A or B, and then also C or D.