SEMICeu / DCAT-AP

This is the issue tracker for the maintenance of DCAT-AP
https://joinup.ec.europa.eu/solution/dcat-application-profile-data-portals-europe
72 stars 24 forks source link

SHACL validation / Different results in online validator and Jena library #366

Closed fxprunayre closed 2 weeks ago

fxprunayre commented 2 months ago

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:

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

image

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.

bertvannuffelen commented 2 months ago

@fxprunayre we have fixed this in the draft release.

fxprunayre commented 2 months ago

Thanks @bertvannuffelen. #365 and #364 are fixed by https://github.com/SEMICeu/DCAT-AP/commit/591fae6038c6f7c06f25d29b39d2df4f30edcd4f

We are still having error reported by the online validator that we don't get using Jena - we will investigate further.