Skip to content

Commit

Permalink
Standard / ISO19139 / Fix removal of online source when multiple
Browse files Browse the repository at this point in the history
transfer options block are used.

Follow up of #7431
  • Loading branch information
fxprunayre committed Jul 29, 2024
1 parent f9d8f0d commit c8d298c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:util="java:org.fao.geonet.util.XslUtil"
xmlns:digestUtils="java:org.apache.commons.codec.digest.DigestUtils"
xmlns:exslt="http://exslt.org/common"
xmlns:gn-fn-rel="http://geonetwork-opensource.org/xsl/functions/relations"
version="2.0"
exclude-result-prefixes="#all">
Expand Down Expand Up @@ -110,7 +109,7 @@
<xsl:value-of select="position()"/>
</idx>
<hash>
<xsl:value-of select="digestUtils:md5Hex(string(exslt:node-set(normalize-space(.))))"/>
<xsl:value-of select="digestUtils:md5Hex(normalize-space(.))"/>
</hash>
<url>
<xsl:apply-templates mode="get-iso19139-localized-string"
Expand Down Expand Up @@ -142,7 +141,7 @@
<xsl:value-of select="position()"/>
</idx>
<hash>
<xsl:value-of select="digestUtils:md5Hex(string(exslt:node-set(normalize-space(.))))"/>
<xsl:value-of select="digestUtils:md5Hex(normalize-space(.))"/>
</hash>
<title>
<xsl:apply-templates mode="get-iso19139-localized-string"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
xmlns:gn-fn-index="http://geonetwork-opensource.org/xsl/functions/index"
xmlns:index="java:org.fao.geonet.kernel.search.EsSearchManager"
xmlns:digestUtils="java:org.apache.commons.codec.digest.DigestUtils"
xmlns:exslt="http://exslt.org/common"
xmlns:util="java:org.fao.geonet.util.XslUtil"
xmlns:date-util="java:org.fao.geonet.utils.DateUtil"
xmlns:daobs="http://daobs.org"
Expand Down Expand Up @@ -1122,8 +1121,7 @@
<xsl:copy-of select="gn-fn-index:add-multilingual-field('orderingInstructions', ., $allLanguages)"/>
</xsl:for-each>

<xsl:for-each select="gmd:transferOptions/*/
gmd:onLine/*[gmd:linkage/gmd:URL != '']">
<xsl:for-each select=".//gmd:onLine/*[gmd:linkage/gmd:URL != '']">

<xsl:variable name="transferGroup"
select="count(ancestor::gmd:transferOptions/preceding-sibling::gmd:transferOptions)"/>
Expand All @@ -1147,7 +1145,7 @@
<atomfeed><xsl:value-of select="gmd:linkage/gmd:URL"/></atomfeed>
</xsl:if>
<link type="object">{
"hash": "<xsl:value-of select="digestUtils:md5Hex(string(exslt:node-set(normalize-space(.))))"/>",
"hash": "<xsl:value-of select="digestUtils:md5Hex(normalize-space(.))"/>",
"idx": <xsl:value-of select="position()"/>,
"protocol":"<xsl:value-of select="util:escapeForJson((gmd:protocol/*/text())[1])"/>",
"mimeType":"<xsl:value-of select="if (*/gmx:MimeFileType)
Expand Down

0 comments on commit c8d298c

Please sign in to comment.