Skip to content

Handling '&' in the vocabulary #104

@olufine

Description

@olufine

Hi, We have vocabularies in which '&' is included in some terms (example Rythm & blues).
When exporting such vocabularies to SKOS, we see that accurrences of '&' are not handled cosistantly, which sometimes cause problems during further processing of the SKOS export.
As far as I understand, the editors in TematTres handle '&' differently:

  • When using Add term from the top menu, the editor disregards '&' altogether. For example: Writing "Trommis & bassist" in that editor just ignores '&' and the term displayed is "Trommis bassist". Likewise, this is exported as "Trommis bassist" in skos
  • When using "Add subordinate term" or "Add alternative term" from the term page menue, '&' seems to be encoded correctly. For example: Writing "Test & test" here shows the whole phrase. And the SKOS export renders this correctly as Test & test, see skos export below:

<skos:Concept rdf:about="http://k8s.stage.nb.no/tematres/musikk/578"> <skos:prefLabel xml:lang="nb">**Trommis bassist**</skos:prefLabel> <skos:altLabel xml:lang="nb">mertest &amp; test</skos:altLabel> <skos:inScheme rdf:resource="http://k8s.stage.nb.no/tematres/musikk"/> <skos:narrower rdf:resource="http://k8s.stage.nb.no/tematres/musikk/579"/> <skos:narrower rdf:resource="http://k8s.stage.nb.no/tematres/musikk/580"/> <dct:created>2026-02-04 15:58:30</dct:created> <dct:modified>2026-02-04 16:17:18</dct:modified> </skos:Concept> <skos:Concept rdf:about="http://k8s.stage.nb.no/tematres/musikk/579"> <skos:prefLabel xml:lang="nb">**Test &amp; test**</skos:prefLabel> <skos:inScheme rdf:resource="http://k8s.stage.nb.no/tematres/musikk"/> <skos:broader rdf:resource="http://k8s.stage.nb.no/tematres/musikk/578"/> <dct:created>2026-02-04 16:16:36</dct:created> </skos:Concept>
I hope you'll look into this and correct the "Add term" editor.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions