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

add validation of SKOS files to SKOS-Editor #1139

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

NTsch
Copy link
Collaborator

@NTsch NTsch commented Apr 4, 2023

This adds a service to the SKOS-Editor app which uses schema files to assure before publication that the SKOS-file which is being edited is valid and has all the necessary elements to be correctly displayed in the index view. This is done using the already existing data:validate function. When the user clicks on the "Publish" button in the editor, the service either returns the error message from the validation report, or publishes as usual if there are no problems.

This closes #1117.

@StephanMa
Copy link
Collaborator

I am currently not sure why you need the xml.xsd... and why "xml"? Isn't RDF and SKOS not XML?

@NTsch
Copy link
Collaborator Author

NTsch commented Apr 4, 2023

I am currently not sure why you need the xml.xsd... and why "xml"?

That's imported so that the xml:lang attribute which appears in the skos.xsd doesn't cause an error. There may be a better solution for this?

@StephanMa
Copy link
Collaborator

declare the namespace upfront should fix the error

@NTsch
Copy link
Collaborator Author

NTsch commented Apr 4, 2023

declare the namespace upfront should fix the error

I've tried both adding xmlns:xml="http://www.w3.org/XML/1998/namespace" in the root (xs:schema) and replacing <xs:attribute ref="xml:lang"/> with <xs:attribute name="lang" xmlns:xml="http://www.w3.org/XML/1998/namespace"/>, but in both cases I still get an error.

@GVogeler
Copy link
Collaborator

GVogeler commented Apr 4, 2023

As far as I know, dchema definitions need to include all parts, i.e. if the schema imports attributes from the XML namespace the simple namespace reference is insufficient.

@StephanMa
Copy link
Collaborator

I See... I really really dislike this approach... but it seems to be the only way to deal with this

@StephanMa
Copy link
Collaborator

@NTsch Can you provide me with a short introduction how to test this?

@StephanMa
Copy link
Collaborator

@NTsch push

@NTsch
Copy link
Collaborator Author

NTsch commented Aug 16, 2023

@NTsch Can you provide me with a short introduction how to test this?

Make a copy of a glossary (-> /mom/index/IllUrkGlossar -> "Create personal copy"), then open it in the editor (MyArchive -> Saved Vocabularies -> Open Vocabulary in SKOS-Editor). There you can create Concepts and properties like prefLabel. If you try to publish when there's a Concept that doesn't have a prefLabel, you should get an error, otherwise it should publish normally.

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 this pull request may close these issues.

introduce SKOS schema file to validate user modifications to vocabularies
3 participants