Skip to content

Commit

Permalink
Set Core Subject Thesarurus dates in udpate-fixed-info process to ove…
Browse files Browse the repository at this point in the history
…rride default behavior in GeoNetwork using the current date. Fixes #308
  • Loading branch information
josegar74 committed Apr 4, 2023
1 parent 14ead08 commit 4d30438
Showing 1 changed file with 46 additions and 1 deletion.
47 changes: 46 additions & 1 deletion src/main/plugin/iso19139.ca.HNAP/update-fixed-info.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,7 @@
</gmd:MD_KeywordTypeCode>
</gmd:type>

<xsl:copy-of select="keyword[1]/gmd:thesaurusName" />
<xsl:apply-templates select="keyword[1]/gmd:thesaurusName" />
</gmd:MD_Keywords>
</gmd:descriptiveKeywords>
</xsl:for-each>
Expand Down Expand Up @@ -955,6 +955,51 @@
</xsl:copy>
</xsl:template>

<!-- Fix the dates for the Core Subject Thesaurus -->
<xsl:template match="gmd:thesaurusName/gmd:CI_Citation[gmd:title/gco:CharacterString='Government of Canada Core Subject Thesaurus' or
gmd:title/gco:CharacterString='Thésaurus des sujets de base du gouvernement du Canada']">

<xsl:copy>
<xsl:copy-of select="@*" />

<xsl:apply-templates select="gmd:title" />
<xsl:apply-templates select="gmd:alternateTitle" />

<gmd:date>
<gmd:CI_Date>
<gmd:date>
<gco:Date>2004</gco:Date>
</gmd:date>
<gmd:dateType>
<gmd:CI_DateTypeCode codeListValue="RI_366" codeList="http://nap.geogratis.gc.ca/metadata/register/napMetadataRegister.xml#IC_87">creation;création</gmd:CI_DateTypeCode>
</gmd:dateType>
</gmd:CI_Date>
</gmd:date>

<gmd:date>
<gmd:CI_Date>
<gmd:date>
<gco:Date>2015-04-21</gco:Date>
</gmd:date>
<gmd:dateType>
<gmd:CI_DateTypeCode codeList="http://nap.geogratis.gc.ca/metadata/register/napMetadataRegister.xml#IC_87" codeListValue="RI_367">publication; publication</gmd:CI_DateTypeCode>
</gmd:dateType>
</gmd:CI_Date>
</gmd:date>

<xsl:apply-templates select="gmd:edition" />
<xsl:apply-templates select="gmd:editionDate" />
<xsl:apply-templates select="gmd:identifier" />
<xsl:apply-templates select="gmd:citedResponsibleParty" />
<xsl:apply-templates select="gmd:presentationForm" />
<xsl:apply-templates select="gmd:series" />
<xsl:apply-templates select="gmd:otherCitationDetails" />
<xsl:apply-templates select="gmd:collectiveTitle" />
<xsl:apply-templates select="gmd:ISBN" />
<xsl:apply-templates select="gmd:ISSN" />
</xsl:copy>
</xsl:template>

<xsl:template match="@xsi:schemaLocation">
<xsl:if test="XslUtil:getSettingValue('system/metadata/validation/removeSchemaLocation') = 'false'">
<xsl:copy-of select="."/>
Expand Down

0 comments on commit 4d30438

Please sign in to comment.