Skip to content

Commit

Permalink
Replace RI codes in security and legal constraints with english strin…
Browse files Browse the repository at this point in the history
…g value (#383)
  • Loading branch information
tylerjmchugh authored May 17, 2024
1 parent 186ac3b commit 133229e
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions src/main/plugin/iso19139.ca.HNAP/layout/tpl-csv.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,31 @@

<xsl:for-each select="gmd:identificationInfo/*/*/gmd:MD_SecurityConstraints/*">
<SecurityConstraints>
<xsl:copy-of select="."/>
<xsl:choose>
<xsl:when test="*/@codeListValue">
<xsl:variable name="classificationCode" select="*/@codeListValue"/>
<xsl:variable name="classificationCodeReadable" select="tokenize($codelists/codelist[@name = 'gmd:MD_ClassificationCode']/entry[code/text() = $classificationCode]/value/text(), ';')[1]"/>
<xsl:value-of select="$classificationCodeReadable"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="*/text()"/>
</xsl:otherwise>
</xsl:choose>
</SecurityConstraints>
</xsl:for-each>

<xsl:for-each select="gmd:identificationInfo/*/*/gmd:MD_LegalConstraints/*">
<LegalConstraints>
<xsl:value-of select="*/text()|*/@codeListValue"/>
<xsl:choose>
<xsl:when test="*/@codeListValue">
<xsl:variable name="restrictionCode" select="*/@codeListValue"/>
<xsl:variable name="restrictionCodeReadable" select="tokenize($codelists/codelist[@name = 'gmd:MD_RestrictionCode']/entry[code/text() = $restrictionCode]/value/text(), ';')[1]"/>
<xsl:value-of select="$restrictionCodeReadable"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="*/text()"/>
</xsl:otherwise>
</xsl:choose>
</LegalConstraints>
</xsl:for-each>

Expand Down

0 comments on commit 133229e

Please sign in to comment.