Coder Social home page Coder Social logo

Comments (4)

jimkont avatar jimkont commented on June 1, 2024

Thanks for the report, could you please send a sample of instance data that fail with this shape?

Technically, each constraint (e.g. maxCount, datatype) is evaluated independently of other constraints and combinations should not have side effects. I suspect there is some issue with the data that you are trying to validate but need to take a look at some passing/failing nodes

from rdfunit.

BorderCloud avatar BorderCloud commented on June 1, 2024

You can download these files:

After, you can enable the constraint maxCount in the file "Organization":

sh:property [
      rdfs:label "signature"^^xsd:string ;
      sh:datatype xsd:string ;
      sh:minCount 1 ;
      sh:maxCount 1 ;
      sh:path <signature> ;
    ] ;

I hope, you can reproduce this problem.
Thanks.

from rdfunit.

jimkont avatar jimkont commented on June 1, 2024

tried the following limited example

schema.ttl

BASE <http://daap.dsi.universite-paris-saclay.fr/wiki/Data:Organization#>

prefix owl: <http://www.w3.org/2002/07/owl#>
prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix sh: <http://www.w3.org/ns/shacl#>
prefix vcard: <http://www.w3.org/2006/vcard/ns#>
prefix xsd: <http://www.w3.org/2001/XMLSchema#>

<Organization>
  a owl:Class ;
  rdfs:label "Organization"@en ;
  rdfs:label "Organisation"@fr ;
  rdfs:subClassOf vcard:Organization.


<Organization>
  a sh:NodeShape ;
  sh:targetClass <Organization> ;

  sh:property [
      rdfs:label "signature"^^xsd:string ;
      sh:datatype xsd:string ;
      sh:minCount 1 ;
      sh:maxCount 1 ;
      sh:path <signature> ;
    ] .


<signature>
  rdf:type rdf:Property ;
  rdfs:label "Official signature of this project in the publication"^^xsd:string 
.

data.ttl


BASE <http://daap.dsi.universite-paris-saclay.fr/wiki/Lip(Sys)2>

prefix daap: <http://daap.dsi.universite-paris-saclay.fr/wiki/>
prefix daapo: <http://daap.dsi.universite-paris-saclay.fr/wiki/Data:Organization#>
prefix user: <http://daap.dsi.universite-paris-saclay.fr/wiki/User:>

prefix owl: <http://www.w3.org/2002/07/owl#>
prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix vcard: <http://www.w3.org/2006/vcard/ns#>
prefix xsd: <http://www.w3.org/2001/XMLSchema#>
prefix wd: <http://www.wikidata.org/entity/>

<> #fix the problem with parenthesis 
  rdf:type daapo:Laboratory ;
  rdfs:label "Lip(Sys)²" ;
  rdfs:label "Lip(Sys)²"@en ;
  rdfs:label "Lip(Sys)²"@fr ;
  daapo:contact user:Pierre_Chaminade ;
  daapo:signature "Lip(Sys)²- Chimie Analytique Pharmaceutique, Univ. Paris-Sud, Université Paris-Saclay, F-92290 Châtenay-Malabry, France" ;
  rdfs:seeAlso  <http://www.lipsys2.universite-paris-saclay.fr/> ;
  daapo:item wd:Q2346 ;
  daapo:item wd:Q6556376 
.

and running

./bin/rdfunit -d {full-path}/data.ttl -s {full-path}/schema.ttl -r shacl -o turtle

does not return any error. Can you send a similar small example where the constraints fail to try and debug the problem?

from rdfunit.

BorderCloud avatar BorderCloud commented on June 1, 2024

Good news... Me too.
Yesterday, I fixed one hundred errors. This morning I tested with all rules maxCount and now, the problem has disappeared.
It's probably a side effect when there are a lot errors...
Sorry for the inconvenience.

from rdfunit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.