DCAT-AP icon indicating copy to clipboard operation
DCAT-AP copied to clipboard

SHACL validation / Different results in online validator and Jena library

Open fxprunayre opened this issue 2 months ago • 2 comments

We are trying to reproduce the SHACL validation report of https://www.itb.ec.europa.eu/shacl/dcat-ap/upload using Jena library in unit tests but we have difficulties to reproduce the same validation reports.

The configuration of the online validator is probably based on https://github.com/ISAITB/validator-resources-dcat-ap/blob/master/resources/config.properties#L117-L128

Jena fails to parse those SHACL files due to 2 types of errors. Errors reported can be fixed using the following:

  • https://github.com/SEMICeu/DCAT-AP/pull/365
  • https://github.com/SEMICeu/DCAT-AP/pull/364

Once applied, we still observe 2 errors reported by the online validator that are not reported by Jena.

image

  • one issue related to foaf:name but unclear is the node related to that error
Property needs to have at least 1 value
Location:[Result path] - [http://xmlns.com/foaf/0.1/name]
  • one related to LegalResource
Value must be an instance of <http://data.europa.eu/eli/ontology#LegalResource>
Location:[Focus node] - [https://metawal.wallonie.be/geonetwork/srv/api/records/7fe2f305-1302-4297-b67e-792f55acd834]Test:[Value] - [https://metawal.wallonie.be/geonetwork/srv/api/records/7fe2f305-1302-4297-b67e-792f55acd834]

Does this errors relates to the validator or to the input test file?

A test file is available here https://gist.githubusercontent.com/fxprunayre/d63b81cff3d3425a82da3d79e6d5742e/raw/2fa7d515159d79c0005c08e5facbcb012c379775/eudcatap.xml

Then other warning reported are consistent with Jena results. Having SHACL rules producing same results whatever the parser in use would be beneficial for all.

fxprunayre avatar Apr 17 '24 10:04 fxprunayre