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 rule for dcat:accessURL #412

Open
josegar74 opened this issue Feb 6, 2025 · 6 comments
Open

SHACL rule for dcat:accessURL #412

josegar74 opened this issue Feb 6, 2025 · 6 comments
Labels

Comments

@josegar74
Copy link

I'm using the validator https://www.itb.ec.europa.eu/shacl/dcat-ap/upload selecting DCAT-AP 3.0.0 Full (individual constraints) to validate an RDF/XML file with the following distribution:

<dcat:distribution>
  <dcat:Distribution>
    <dcat:accessURL rdf:resource="http://mylink.com"/>
  </dcat:Distribution>
</dcat:distribution>

I get the following error.

Image

I am using https://github.com/SEMICeu/iso-19139-to-dcat-ap/blob/main/iso-19139-to-dcat-ap.xsl to produce DCAT-AP in RDF/XML from ISO19139 documents. I am not an expert in DCAT-AP and I am not sure if it is problem in dcat:accessURL format that creates the above process in https://github.com/SEMICeu/iso-19139-to-dcat-ap/blob/abeb023837e642d2cfe62214f6e2aef9f1ef3599/iso-19139-to-dcat-ap.xsl#L1441 or if it is a problem in the validation rules.


Tested also with Turtle format and get the same issue with the same validation: DCAT-AP 3.0.0 Full (individual constraints)

@prefix dcat: <http://www.w3.org/ns/dcat#> .
<http://mylink.com> a dcat:Distribution;
   dcat:accessURL <http://mylink.com> ;
@EmidioStani
Copy link
Member

Dear @josegar74 ,

accordigly to DCAT-AP 3.0.0 the access url should be a rdfs:Resource.

However, you can safely ignore the message, as the link could be defined somewhere else.

@josegar74
Copy link
Author

@EmidioStani thanks for the quick reply. The problem with ignoring the message is that my client will not be happy to see the message as an error.

This is probably a very DCAT dummy question, but how should it be encoded the element in RDF/XML as an rdfs:Resource? Do you have any examples?

@bertvannuffelen
Copy link
Contributor

@josegar74 I tested the validator and it seems that there is some config issue. I tried it with the shacls directly and then you get:

Image

@josegar74
Copy link
Author

@EmidioStani thanks, I was testing using the option DCAT-AP 3.0.0 Full (individual constraints). I will try with the SHACL files directly, maybe the validator rules are not updated.

@bertvannuffelen
Copy link
Contributor

@josegar74 , this is bug in that file.

The issue is that the SHACL generator creates correctly a test for the range (simple export).

However in this case the range is rdfs:Resource.
This is in RDF validation not to be checked with a "be of that class". It is actually superseeded by the nodeKind test.
We have to fix the generator to that case in the tool into account.

For now, we will update the shapes in the draft and update the links in the configuration of the test bed.

@josegar74
Copy link
Author

Thanks a lot for all the support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants