Skip to content

Commit

Permalink
Formatter / DCAT / Map ISO language codes (bibliographic codes) to DC…
Browse files Browse the repository at this point in the history
…AT language codes (terminology codes)
  • Loading branch information
josegar74 committed Oct 15, 2024
1 parent 08a58c8 commit 24b2a4f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,15 @@
|mri:otherLocale
|mdb:defaultLocale
|mdb:otherLocale">
<xsl:variable name="languageValue"
as="xs:string?"
select="if ($isoToDcatLanguage[@key = current()/*/lan:language/*/@codeListValue])
then $isoToDcatLanguage[@key = current()/*/lan:language/*/@codeListValue]
else */lan:language/*/@codeListValue"/>

<dct:language>
<!-- TO CHECK: In DCAT, maybe we should use another base URI? -->
<dct:LinguisticSystem rdf:about="{concat($europaPublicationLanguage, upper-case(*/lan:language/*/@codeListValue))}"/>
<dct:LinguisticSystem rdf:about="{concat($europaPublicationLanguage, upper-case($languageValue))}"/>
</dct:language>
</xsl:template>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,4 +203,18 @@
<entry key="https://publications.europa.eu/resource/authority/file-type/GML">wps</entry>
<entry key="https://publications.europa.eu/resource/authority/file-type/ZIP">zip</entry>
</xsl:variable>

<!-- DCAT uses the terminology code, while ISO uses bibliographic code.
For some languages like Dutch, French or German the values differ. -->
<xsl:variable name="isoToDcatLanguage"
as="node()*">
<entry key="dut">nld</entry> <!-- Dutch -->
<entry key="cze">ces</entry> <!-- Czech -->
<entry key="ger">deu</entry> <!-- German -->
<entry key="gre">ell</entry> <!-- Greek -->
<entry key="fre">fra</entry> <!-- French -->
<entry key="rum">ron</entry> <!-- Romanian -->
<entry key="slo">slk</entry> <!-- Slovak -->
<entry key="ice">isl</entry> <!-- Icelandic-->
</xsl:variable>
</xsl:stylesheet>

0 comments on commit 24b2a4f

Please sign in to comment.