Skip to content

Issue 414: list constraints #416

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 53 commits into from
Jul 7, 2025
Merged

Issue 414: list constraints #416

merged 53 commits into from
Jul 7, 2025

Conversation

jeswr
Copy link
Member

@jeswr jeswr commented Jun 28, 2025

Closes #414. This PR implements sh:minListLength, sh:maxListLength and sh:uniqList.


My interpretation of the following from the definition of 2.1.1 Constraints, Parameters and Constraint Components is that because the sh:MemberShapeConstraintComponent now has multiple parameters; there can only be one occurrence of sh:memberShape in a given shape - and I have updated the sh:maxCount accordingly.

Some constraint components declare only a single parameter. For example sh:ClassConstraintComponent has the single parameter sh:class. These parameters may be used multiple times in the same shape, and each value of such a parameter declares an individual constraint. The interpretation of such declarations is conjunction, i.e. all constraints apply. The following example specifies that the values of ex:customer have to be SHACL instances of both ex:Customer and ex:Person.


⚠️⚠️ ⚠️
This is currently targeted to #403 branch for a smaller diff in the GH UI. #403 should be merged and this targeted to gh-pages rather than merging this branch into #403

jeswr and others added 29 commits June 26, 2025 20:37
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
@jeswr jeswr marked this pull request as ready for review June 28, 2025 12:43
Copy link
Contributor

@HolgerKnublauch HolgerKnublauch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am in the middle of implementing all this in Java and found various issues.

@jeswr jeswr requested a review from HolgerKnublauch June 30, 2025 10:31
@jeswr
Copy link
Member Author

jeswr commented Jun 30, 2025

I have addressed the issues found - is there an(other?) open source implementation that'd be useful for me to implement the changes against (@bergos' JS shacl-engine perhaps) in case there are any more errors to catch.

P.S. I am conferencing for the next 3 days so will be slow to respond

@jeswr jeswr requested a review from HolgerKnublauch July 3, 2025 16:24
@jeswr
Copy link
Member Author

jeswr commented Jul 7, 2025

Thanks for the fixes @HolgerKnublauch

In case needed as future provenance for others: note that 58daff6 makes it such that if a list is malformed - the sh:value should always be the head of the list - not the first malformed node.

@jeswr jeswr changed the base branch from feat/memberShape to gh-pages July 7, 2025 20:11
@jeswr jeswr merged commit 984d90d into gh-pages Jul 7, 2025
1 check passed
@jeswr jeswr deleted the feat/list-constraints branch July 7, 2025 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extend collection validation features
2 participants