[data-shapes] Ability to validate the number of targets of NodeShapes (using sh:minCount on NodeShape ?) (#518)

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

== Ability to validate the number of targets of NodeShapes (using sh:minCount on NodeShape ?) ==
This is a refinement of #325 that describes the need to know which shapes actually matched some targets, and which didn't.

The refinement is the following: I have the need to validate the number of targets of certain NodeShapes, and in particular I need to validate that certain node shapes are present at least once in the input graph.
Sometimes it is OK that a shape didn't validated anything, but sometimes this should be considered an error.

This leads me to think of expressing an `sh:minCount` on sh:NodeShape (could be `sh:maxCount` only of course to check a maximum number of targets).

Given this:

```ttl
ex:PersonShape a sh:NodeShape ;
  sh:minCount 1 ;
```

when validating an input graph, a validation error will be triggered if `ex:PersonShape` hasn't targeted at least one shape.



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


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

Received on Wednesday, 20 August 2025 16:44:02 UTC