Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set Core Subject Thesarurus dates in udpate-fixed-info process to override default behavior in GeoNetwork using the current date #326

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 -->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be a bug specifically to fix "Core Subject Thesaurus" Thesarurus

I would have expected a fix that would not change the Thesarurus date if a value already exists. Otherwise are we not going to have the same issue with the other 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