Skip to content

Commit

Permalink
UBO-341 FSU040THUL-3715 Display at least language code when language …
Browse files Browse the repository at this point in the history
…code cannot be resolved (#401)
  • Loading branch information
Possommi authored Jul 9, 2024
1 parent 5d3cceb commit 35c139c
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion ubo-common/src/main/resources/xsl/mods-display.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -1663,7 +1663,17 @@

<!-- ========== Sprache der Publikation ========== -->
<xsl:template match="mods:languageTerm[@type='code']">
<xsl:value-of select="document(concat('notnull:language:',.))/language/label[@xml:lang=$CurrentLang]" />
<xsl:variable name="lang" select="document(concat('notnull:language:', .))/language/label[@xml:lang=$CurrentLang]" />

<xsl:choose>
<xsl:when test="string-length($lang) &gt; 0">
<xsl:value-of select="$lang"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="."/>
</xsl:otherwise>
</xsl:choose>

<xsl:if test="position() != last()">
<xsl:text>, </xsl:text>
</xsl:if>
Expand Down

0 comments on commit 35c139c

Please sign in to comment.