Skip to content
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

shacl:maxCount "n"^^xsd:integer; #49

Closed
MPParsley opened this issue Jan 20, 2023 · 7 comments
Closed

shacl:maxCount "n"^^xsd:integer; #49

MPParsley opened this issue Jan 20, 2023 · 7 comments

Comments

@MPParsley
Copy link

When testing such a constraint in a shape I always get ": More than n values".

Is this supported: shacl:maxCount "n"^^xsd:integer;?

@tpluscode
Copy link
Collaborator

Can you share an example? I have been using this constraint without problems

@MPParsley
Copy link
Author

Hi @tpluscode, I'm validating this dcat with this shape

Note that the context in the dcat needs to be updated, cf. StadGent/node_service_eventstream-api#39

@tpluscode
Copy link
Collaborator

You can share directly from the playground. That would be ideal, so that I don't have to retrace your steps, please

@MPParsley
Copy link
Author

MPParsley commented Jan 20, 2023

Nice! See https://s.zazuko.com/gLxYM7

This constraint for example returns ": More than n values"

<https://data.vlaanderen.be/shacl/DCAT-AP-VL-20#CatalogusShape> a shacl:NodeShape;
  shacl:closed false;
  shacl:property [
    shacl:class <http://www.w3.org/ns/adms#Identifier>;
    shacl:description "Een alternatieve identificator (dan de unieke identificator) voor de catalogus kan hier beschreven worden.";
    shacl:maxCount "n"^^xsd:integer;
    shacl:name "alternatieve idenficator";
    shacl:path <http://www.w3.org/ns/adms#identifier>
  ], [

@tpluscode
Copy link
Collaborator

Oh, I misunderstood your initial question. You literally have "n"^^xsd:integer in the shapes. I thought you meant N figuratively.

Is that a feature of SHACL? And what result do you expect? What is n in any given context?

@MPParsley
Copy link
Author

MPParsley commented Jan 20, 2023

Well, that is indeed the question :-)

I would expect it to check for any integer amount but then it shouldn't fail if there are zero (as is the case here). Not sure what is the added value of such a constraint either.

Hence my question on Informatievlaanderen/OSLOthema-DCATAPVlaanderen#22

@tpluscode
Copy link
Collaborator

Pretty sure the shapes need to be fixed.

Let me close here for now. Feel free to open if you think there is in fact something to fix on our end

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

No branches or pull requests

2 participants