Skip to content

Commit

Permalink
feat: set datafeeder template on 19115-3 standard
Browse files Browse the repository at this point in the history
  • Loading branch information
f-necas committed Nov 12, 2024
1 parent a62f667 commit c269bdc
Show file tree
Hide file tree
Showing 3 changed files with 496 additions and 471 deletions.
31 changes: 15 additions & 16 deletions datafeeder/inspire/topic_category.xsl
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exslt="http://exslt.org/common"
xmlns:geonet="http://www.fao.org/geonetwork" xmlns:skos="http://www.w3.org/2004/02/skos/core#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:dcterms="http://purl.org/dc/terms/" xmlns:gco="http://www.isotc211.org/2005/gco"
xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:srv="http://www.isotc211.org/2005/srv"
xmlns:gmx="http://www.isotc211.org/2005/gmx" xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:util="java:org.fao.geonet.util.XslUtil" version="2.0" exclude-result-prefixes="#all">
xmlns:geonet="http://www.fao.org/geonetwork" xmlns:skos="http://www.w3.org/2004/02/skos/core#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:dcterms="http://purl.org/dc/terms/" xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:util="java:org.fao.geonet.util.XslUtil" xmlns:mri="http://standards.iso.org/iso/19115/-3/mri/1.0"
version="2.0" exclude-result-prefixes="#all">

<!--
Template to add a <gmd:topicCategory> for each
<!--
Template to add a <gmd:topicCategory> for each
gmd:descriptiveKeywords/gmd:MD_Keywords/gmd:keyword/gco:CharacterString
matching the mappings defined here from keyword to RDF entry
Expand All @@ -24,12 +23,12 @@ The document must have an empty gmd:identificationInfo/gmd:MD_DataIdentification
<xsl:variable name="topiccat_code" select="$topiccat-map/entry[@rdf:about=$rdf_about_id]/@topiccatcode"/>
<xsl:choose>
<xsl:when test="$topiccat_code != ''">
<gmd:topicCategory>
<gmd:MD_TopicCategoryCode>
<mri:topicCategory>
<mri:MD_TopicCategoryCode>
<xsl:value-of select="$topiccat_code" />
</gmd:MD_TopicCategoryCode>
</gmd:topicCategory>
</xsl:when>
</mri:MD_TopicCategoryCode>
</mri:topicCategory>
</xsl:when>
<xsl:otherwise>
<xsl:comment>
No mapping exists for rdf:about= '<xsl:value-of select="$rdf_about_id"/>'.
Expand All @@ -44,8 +43,8 @@ The document must have an empty gmd:identificationInfo/gmd:MD_DataIdentification
</xsl:choose>
</xsl:for-each>
</xsl:template>
<!--

<!--
Mapping of <rdf:Description rdf:about="<id>"> in themes.rdf to topic category codes
-->
<xsl:variable name="topiccat-map">
Expand Down Expand Up @@ -82,4 +81,4 @@ The document must have an empty gmd:identificationInfo/gmd:MD_DataIdentification
<entry topiccatcode="economy" rdf:about="33" />
<entry topiccatcode="economy" rdf:about="34" />
</xsl:variable>
</xsl:stylesheet>
</xsl:stylesheet>
Loading

0 comments on commit c269bdc

Please sign in to comment.