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 -> shex cardinality bugs #637

Open
jeswr opened this issue Mar 22, 2024 · 0 comments · May be fixed by #638
Open

shacl -> shex cardinality bugs #637

jeswr opened this issue Mar 22, 2024 · 0 comments · May be fixed by #638

Comments

@jeswr
Copy link

jeswr commented Mar 22, 2024

When a shacl constraint has an inspecified maxCount, there is no maximum bound. This means that if I have the following shape

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix ex: <http://example.org/test#> .

ex:TestShape a sh:NodeShape ;
  sh:targetClass ex:AccessRequest ;
  sh:property [
    sh:path ex:requestedGraphs ;
    sh:minCount 1 ;
    sh:datatype xsd:string
  ] .

Then the following should be generated

prefix xsd: <http://www.w3.org/2001/XMLSchema#>
prefix ex: <http://example.org/test#>
prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
prefix sh: <http://www.w3.org/ns/shacl#>
ex:TestShape  {
ex:requestedGraphs  xsd:string{1,}
}

instead of

prefix xsd: <http://www.w3.org/2001/XMLSchema#>
prefix ex: <http://example.org/test#>
prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
prefix sh: <http://www.w3.org/ns/shacl#>
ex:TestShape  {
ex:requestedGraphs  xsd:string{1,1}
}

Similarly the default for minCount is 0 wheras the converter here uses a default of 1.

jeswr added a commit to jeswr/phd-language-dialogue-experiment that referenced this issue Mar 23, 2024
@jeswr jeswr linked a pull request Mar 26, 2024 that will close this issue
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 a pull request may close this issue.

1 participant