Skip to content

Metadata language after import (and before edit) not as expected #136

@heidivanparys

Description

@heidivanparys

I created the following small test file.

<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
    xmlns:foaf="http://xmlns.com/foaf/0.1/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:dcat="http://www.w3.org/ns/dcat#"
    xmlns:dct="http://purl.org/dc/terms/"
    xmlns:skos="http://www.w3.org/2004/02/skos/core#"
    xmlns:vcard="http://www.w3.org/2006/vcard/ns#"
    xmlns:dcatap="http://data.europa.eu/r5r/">
    <dcat:Catalog>
        <dcat:dataset>
            <dcat:Dataset>
                <dct:description xml:lang="en">Description</dct:description>
                <dct:description xml:lang="nl">Beschrijving</dct:description>
                <dct:identifier>cec47785-bfbc-416a-8c85-7648b6c07abc</dct:identifier>
                <dct:publisher>
                    <foaf:Agent>
                        <foaf:name xml:lang="en">Example organisation</foaf:name>
                        <foaf:name xml:lang="nl">Voorbeeldorganisatie</foaf:name>
                        <foaf:mbox rdf:resource="mailto:example@example.org" />
                    </foaf:Agent>
                </dct:publisher>
                <dct:title xml:lang="en">Minimal example with English and Dutch</dct:title>
                <dct:title xml:lang="nl">Minimaal voorbeeld met Engels en Nederlands</dct:title>
            </dcat:Dataset>
        </dcat:dataset>
        <dcat:record>
            <dcat:CatalogRecord>
                <dct:language>
                    <skos:Concept rdf:about="http://publications.europa.eu/resource/authority/language/ENG">
                        <skos:inScheme rdf:resource="http://publications.europa.eu/resource/authority/language" />
                    </skos:Concept>
                </dct:language>
                <dct:language>
                    <skos:Concept rdf:about="http://publications.europa.eu/resource/authority/language/NLD">
                        <skos:inScheme rdf:resource="http://publications.europa.eu/resource/authority/language" />
                    </skos:Concept>
                </dct:language>
                <dct:identifier>b5d89334-2424-4751-a23b-cb994c4825e7</dct:identifier>
            </dcat:CatalogRecord>
        </dcat:record>
    </dcat:Catalog>
</rdf:RDF>

When I import and view the record, "en" is listed as a Metadata language (together with "English" and "Nederlands", independent of whether I choose Dutch or English in the GUI.

Image Image

When I edit and save the metadata record (after applying the commit mentioned in #134), the display is as expected, "en" is not listed any more as Metadata language:

Image

This issue is relevant when harvesting DCAT-AP metadata records from other data portals, and metadata is shown as is.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions