Skip to content

Commit

Permalink
TUBS-79 fix variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
kkrebs committed Dec 12, 2024
1 parent 0bbccc5 commit 2ddea61
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/main/resources/xslt/mods2metsmods.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -109,17 +109,16 @@
<xsl:variable name="licenseClass" select="'mir_licenses'"/>
<xsl:variable name="licenseId"
select="substring-after($object/mycoreobject/metadata/def.modsContainer/modsContainer/mods:mods/mods:accessCondition[@type='use and reproduction']/@xlink-href, '#')"/>
<xsl:variable name="license"
<xsl:variable name="licenseCategory"
select="document('classification:metadata:-1:children:mir_licenses')/mycoreclass//category[@ID=$licenseId]" />
<xsl:choose>
<xsl:when test="$license/url[@xlink:href]">
<xsl:value-of select="$license/url/@xlink:href" />
<xsl:when test="$licenseCategory/url[@xlink:href]">
<xsl:value-of select="$licenseCategory/url/@xlink:href" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$license/label[@xml:lang=$CurrentLang or position()=1]" />
<xsl:value-of select="$licenseCategory/label[@xml:lang=$CurrentLang or position()=1]/@text" />
</xsl:otherwise>
</xsl:choose>

</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$license"/>
Expand Down

0 comments on commit 2ddea61

Please sign in to comment.