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

Errors in SKOS export #96

Open
olufine opened this issue Jan 22, 2025 · 5 comments
Open

Errors in SKOS export #96

olufine opened this issue Jan 22, 2025 · 5 comments

Comments

@olufine
Copy link

olufine commented Jan 22, 2025

Hi,
We have recently installed v. 3.5.1, and experience problems with the SKOS export, as notes are only partially included. Example:

Below is a screenshot from the term "Aktivitetsbøker" in our genre vocabulary:

Image

This term is bnow exported like this:
<skos:Concept rdf:about="http://tematres.nb.no/vocab/skos6"> <skos:prefLabel xml:lang="nb">Aktivitetsbøker</skos:prefLabel> <skos:altLabel xml:lang="nb">Malebøker</skos:altLabel> <skos:altLabel xml:lang="nb">Tegne-, male- og fargeleggingsbøker</skos:altLabel> <skos:altLabel xml:lang="nb">Tellebøker</skos:altLabel> <skos:example xml:lang="nb">Snøsøsteren : aktivitetsbok / Maja Lunde og Lisa Aisato ; omslagsdesign og layout: Terese Moe Leiner. </skos:example> <skos:inScheme rdf:resource="http://tematres.nb.no/vocab"/> <skos:broader rdf:resource="http://tematres.nb.no/vocab/skos33"/> <skos:broader rdf:resource="http://tematres.nb.no/vocab/skos404"/> <skos:broader rdf:resource="http://tematres.nb.no/vocab/skos479"/> <skos:exactMatch> <skos:Concept rdf:about="http://tematres.nb.no/vocab/skos489"> <skos:prefLabel xml:lang="en">Activity books</skos:prefLabel> </skos:Concept> </skos:exactMatch> <skos:exactMatch> <skos:Concept rdf:about="http://tematres.nb.no/vocab/skos815"> <skos:prefLabel xml:lang="nn">Aktivitetsbøker</skos:prefLabel> </skos:Concept> </skos:exactMatch> <skos:exactMatch> <skos:Concept rdf:about="http://id.loc.gov/authorities/genreForms/gf2017026059"/> </skos:exactMatch> <dct:created>2019-03-06 12:20:30</dct:created> <dct:modified>2019-04-25 13:35:59</dct:modified> </skos:Concept>

As you can see, instead of a definition and 4 examples, only 1 example is included in the export. In fact, after a cursory glance through the whole export, it seems to me that the new version only exports one note for each concept, and it seems arbitrary whether the exported note is the definition, an example or a scope note. (I also have an older export of the same term, performed with v3.4, and there all the notes are included. So this must have happened recently)

I do hope this is a bug and not a feature..., and would greaty appreciate if you could fix it as soon as possible, as we rely on the skos export for publishing our vocabulary in SKOSMOS, and we need public notes to be part of that export. Thanks in advance!

Another thing I noticed, was the change of the URIs in the export. They are now for example .../skos33 instead of .../33. I didn't find anything about this in the release notes.

@a-roussos
Copy link
Contributor

Hi @olufine!

Another thing I noticed, was the change of the URIs in the export. They are now for example .../skos33 instead of .../33. I didn't find anything about this in the release notes.

At the top of your Vocabulary's About page the URI configuration parameter does not end in a forward slash.
Could that be the reason behind what you observed?

@tematres
Copy link
Owner

Hi @olufine (& @a-roussos ) please be patient with my english :) I will try to go in order:

  1. As @a-roussos tell , the configuration of the URI of the vocabulary needs the last slash (/). You can fix this in the configuration form (Menu->Admin->Configuration)
  2. To use "pretty URIs" you need to enable the mod_rewrite in your web server. If not, the server cant resolve URIs like https://r020.com.ar/tematres/demo/skos/1
  3. Notes: mmmm, I think you found a bug! :) I will to check and try fix it. Thank you!

@olufine
Copy link
Author

olufine commented Jan 23, 2025

Hi, Concerning the exported URIs, it doesn't seem that a trailing / will help. In fact, adding / to the base URI only leads to double / in the exported URI. Here is how the URI of term 414 (Adaptasjoner) is/was exported in the various configurations:

With URI-base = http://tematres.nb.no/vocab:

With URI-base = http://tematres.nb.no/vocab/:

Anyway, this isn't a big issue, we are converting the URIs to another syntax before publishing anyway. My point was only that I didn't find anything about this change in the release notes...

@tematres
Copy link
Owner

Hi @olufine (and @a-roussos ). The bug about the notes was solved. We upload the fixed file (fun.xml.php) and you can download the fixed code. Thank you for discovering this bug!!! :)

About the URIs in skos XML: maybe can check the configuration of the "_URI_SEPARATOR_ID" in /vocab/config.tematres.php :

The default configuration looks like this:
// Config char between _URI_BASE_ID and term ID. If null, use '?tema=' for HTTP response
$CFG["_URI_SEPARATOR_ID"] = 'skos/';

@olufine
Copy link
Author

olufine commented Feb 5, 2025

Hi @tematres, I'm happy to hear that that you solved the bug! However, the guys in my IT department prefer to install whole releases, not replace parts of the code in an installed version. When will you release e new version?

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

No branches or pull requests

3 participants