Skip to content

Commit

Permalink
Merge latest changes made in metadata101 which were not part of #4701.
Browse files Browse the repository at this point in the history
  • Loading branch information
fxprunayre committed Aug 19, 2020
1 parent 6fbd1ca commit ca8b665
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,7 @@
*[gml:beginPosition != '']|*[gml:endPosition != '']|
*[gco:Date != '']|*[gco:DateTime != '']|*[gco:TM_PeriodDuration != '']|
*[*/@codeListValue]|*[@codeListValue]|
gml:identifier[. != '']|gml:name[. != '']|
gml:description[. != '']|gml:timePosition[. != '']|
gml:beginPosition[. != '']|gml:endPosition[. != '']"
priority="500">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1089,7 +1089,7 @@
</entry>
<entry>
<code>dataCentre</code>
<label>Centre de données)</label>
<label>Centre de données</label>
<description>Mot clé qui identifie un dépôt de données ou une archive qui
gère et répartit des données
</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,36 @@
</xsl:template>


<xsl:template match="mri:descriptiveKeywords[not(*/mri:thesaurusName)]" priority="10">
<xsl:variable name="name" select="name()"/>
<xsl:variable name="freeTextKeywordBlockType"
select="*/mri:type/*/@codeListValue"/>
<xsl:variable name="isFirstFreeTextKeywordBlockOfThisType"
select="count(preceding-sibling::*[
name() = $name
and not(*/mri:thesaurusName)
and */mri:type/*/@codeListValue = $freeTextKeywordBlockType]) = 0"/>

<xsl:if test="$isFirstFreeTextKeywordBlockOfThisType">
<xsl:copy>
<xsl:apply-templates select="@*"/>
<mri:MD_Keywords>
<xsl:apply-templates select="*/mri:keyword"/>

<!-- Combine all free text keyword of same type -->
<xsl:apply-templates select="following-sibling::*[
name() = $name
and not(*/mri:thesaurusName)
and */mri:type/*/@codeListValue = $freeTextKeywordBlockType]/*/mri:keyword"/>

<xsl:apply-templates select="*/mri:type"/>
</mri:MD_Keywords>
</xsl:copy>
</xsl:if>
</xsl:template>



<!-- Remove empty DQ elements, empty transfer options. -->
<xsl:template match="mdb:dataQualityInfo[count(*) = 0]"/>
<xsl:template match="mrd:transferOptions[mrd:MD_DigitalTransferOptions/count(*) = 0]"/>
Expand Down

0 comments on commit ca8b665

Please sign in to comment.