[data-shapes] [UI] How to deal with various property shapes for one sh:path and possible sh:severity differences? (#591)

danielbeeke has just created a new issue for https://github.com/w3c/data-shapes:

== [UI] How to deal with various property shapes for one sh:path and possible sh:severity differences? ==
**Problem:**

In SHACL (when using for validation) it is perfectly fine to define multiple property shapes for one `sh:path`. These property shapes might have different `sh:severity` values. Multiple shapes for one `sh:path` are for example used to define specific `sh:message`s for the various constraints.

When creating a user interface one could group property shapes on their `sh:path`. This introduces new challenges. Some SHACL properties might be defined multiple times over the various property shapes.

One way to deal with these ‘duplicates’ is to have a little helper that determines the most appropriate variant. As a rule, SHACL will always execute all shapes, meaning for example for `sh:minCount` that we should pick the biggest `sh:minCount`. But.. this only is valid when both severities are `sh:Violation`. 

This becomes more complex for properties that do not have numbers. How to deal with two `sh:group`s for example.

I propose that the working group creates a standard algorithm that UI builders can implement to resolve these issues. 

If the working group wants to do this, what is the algorithm to go from SHACL validation rules to 
UI declaration rules?

**Concrete question:**

When one field has various property shapes, each with possible sh:severity, how to combine these property shapes into one field declaration?


Please view or discuss this issue at https://github.com/w3c/data-shapes/issues/591 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 1 October 2025 11:40:35 UTC