Skip to content
Snippets Groups Projects
Commit d4a01032 authored by seitenbau-govdata's avatar seitenbau-govdata Committed by jvanzadelhoff
Browse files

Add themes from keywords as well

parent a9f96b02
Branches
Tags
No related merge requests found
<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<!-- refer to https://publications.europa.eu/en/web/eu-vocabularies/at-dataset/-/resource/dataset/data-theme/
The following names are extracted from data-theme-skos.rdf vocabulary. -->
<dcatThemes>
<dcatTheme name="AGRI"/>
<dcatTheme name="EDUC"/>
<dcatTheme name="ENVI"/>
<dcatTheme name="ENER"/>
<dcatTheme name="TRAN"/>
<dcatTheme name="TECH"/>
<dcatTheme name="ECON"/>
<dcatTheme name="SOCI"/>
<dcatTheme name="HEAL"/>
<dcatTheme name="GOVE"/>
<dcatTheme name="REGI"/>
<dcatTheme name="JUST"/>
<dcatTheme name="INTR"/>
</dcatThemes>
</rdf:RDF>
\ No newline at end of file
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
<xsl:variable name="ianaMediaTypes" select="document('iana-media-types.xml')"/> <xsl:variable name="ianaMediaTypes" select="document('iana-media-types.xml')"/>
<xsl:variable name="languageCodes" select="document('languageCodes.rdf')"/> <xsl:variable name="languageCodes" select="document('languageCodes.rdf')"/>
<xsl:variable name="inspireThemes" select="document('themes.rdf')"/> <xsl:variable name="inspireThemes" select="document('themes.rdf')"/>
<xsl:variable name="dcatThemes" select="document('dcat-themes.rdf')"/>
<xsl:variable name="inspire_md_codelist">http://inspire.ec.europa.eu/metadata-codelist/</xsl:variable> <xsl:variable name="inspire_md_codelist">http://inspire.ec.europa.eu/metadata-codelist/</xsl:variable>
...@@ -993,7 +994,16 @@ ...@@ -993,7 +994,16 @@
</xsl:template> </xsl:template>
<xsl:template match="gmd:identificationInfo/*/gmd:descriptiveKeywords/*[not(gmd:thesaurusName)]/gmd:keyword/gco:CharacterString"> <xsl:template match="gmd:identificationInfo/*/gmd:descriptiveKeywords/*[not(gmd:thesaurusName)]/gmd:keyword/gco:CharacterString">
<xsl:variable name="kwString" select="translate(text(),'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/>
<xsl:variable name="listTheme" select="$dcatThemes/rdf:RDF/dcatThemes/dcatTheme[@name=$kwString]"/>
<xsl:choose>
<xsl:when test="$listTheme">
<dcat:theme rdf:resource="{concat('http://publications.europa.eu/resource/authority/data-theme/', $kwString)}"/>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="dcatKeyword"/> <xsl:call-template name="dcatKeyword"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template> </xsl:template>
<xsl:template match="gmd:identificationInfo/*/gmd:descriptiveKeywords/*[starts-with(gmd:thesaurusName/gmd:CI_Citation/gmd:title/*, 'GEMET - INSPIRE themes')]/gmd:keyword[position() &gt; 1]/gco:CharacterString"> <xsl:template match="gmd:identificationInfo/*/gmd:descriptiveKeywords/*[starts-with(gmd:thesaurusName/gmd:CI_Citation/gmd:title/*, 'GEMET - INSPIRE themes')]/gmd:keyword[position() &gt; 1]/gco:CharacterString">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment