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

Unable to rename graphicOverview #8442

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -95,19 +95,28 @@
</xsl:template>

<!-- Updating the gmd:graphicOverview based on update parameters -->
<!-- Note: first part of the match needs to match the xsl:for-each select from extract-relations.xsl in order to get the position() to match -->
<!-- The unique identifier is marked with resourceIdx which is the position index and resourceHash which is hash code of the current node (combination of url, resource name, and description) -->
<xsl:template
priority="2"
match="*//gmd:graphicOverview
[$resourceIdx = '' or position() = xs:integer($resourceIdx)]
[ ($resourceHash != '' or ($updateKey != '' and normalize-space($updateKey) = concat(
<!-- Template to match all gmd:graphicOverview elements -->
<xsl:template match="//gmd:graphicOverview" priority="2">
<!-- Calculate the global position of the current gmd:graphicOverview element -->
<xsl:variable name="position" select="count(//gmd:graphicOverview[current() >> .]) + 1" />

<xsl:choose>
<!-- The unique identifier is marked with resourceIdx which is the position index and resourceHash which is hash code of the current node (combination of url, resource name, and description) -->
<xsl:when test="($resourceIdx = '' or $position = xs:integer($resourceIdx)) and
($resourceHash != '' or ($updateKey != '' and normalize-space($updateKey) = concat(
*/gmd:fileName/gco:CharacterString,
*/gmd:fileName/gmd:PT_FreeText/gmd:textGroup/gmd:LocalisedCharacterString[@locale = '#DE'],
*/gmd:fileDescription/gmd:PT_FreeText/gmd:textGroup/gmd:LocalisedCharacterString[@locale = '#DE'],
*/gmd:fileDescription/gco:CharacterString)))
and ($resourceHash = '' or digestUtils:md5Hex(normalize-space(.)) = $resourceHash)]">
<xsl:call-template name="fill"/>
and ($resourceHash = '' or digestUtils:md5Hex(normalize-space(.)) = $resourceHash)">
<xsl:call-template name="fill"/>
</xsl:when>
<xsl:otherwise>
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

<!-- TMP TO REMOVE when gco:characterString is added in multilingual elements
Expand Down