<xsl:when test="$code='zul'"><xsl:text>Zulu</xsl:text></xsl:when>
<xsl:when test="$code='zun'"><xsl:text>Zuni</xsl:text></xsl:when>
<xsl:otherwise>
- <xsl:text>Unknown language code</xsl:text>
+ <!-- when 041$a is mapped to an authorised value list, this will show the description -->
+ <xsl:value-of select="$code" />
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<span class="label"><xsl:value-of select="$langLabel"/></span>
<xsl:for-each select="$langNode">
<span>
- <xsl:attribute name="class">lang_code-<xsl:value-of select="substring(translate(., ' .-;|#', '_'),1,3)"/></xsl:attribute>
+ <xsl:attribute name="class">lang_code-<xsl:value-of select="translate(., ' .-;|#', '_')"/></xsl:attribute>
<xsl:call-template name="languageCodeText">
- <xsl:with-param name="code" select="substring(.,1,3)"/>
+ <xsl:with-param name="code" select="translate(., ' .-;|#', '')"/>
</xsl:call-template>
<xsl:if test="position() != last()">
<span class="sep"><xsl:text>, </xsl:text></span>
<xsl:when test="$code='zul'"><xsl:text>Zulu</xsl:text></xsl:when>
<xsl:when test="$code='zun'"><xsl:text>Zuni</xsl:text></xsl:when>
<xsl:otherwise>
- <xsl:text>Unknown language code</xsl:text>
+ <!-- when 041$a is mapped to an authorised value list, this will show the description -->
+ <xsl:value-of select="$code" />
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<span class="label"><xsl:value-of select="$langLabel"/></span>
<xsl:for-each select="$langNode">
<span>
- <xsl:attribute name="class">lang_code-<xsl:value-of select="substring(translate(., ' .-;|#', '_'),1,3)"/></xsl:attribute>
+ <xsl:attribute name="class">lang_code-<xsl:value-of select="translate(., ' .-;|#', '_')"/></xsl:attribute>
<xsl:call-template name="languageCodeText">
- <xsl:with-param name="code" select="substring(.,1,3)"/>
+ <xsl:with-param name="code" select="translate(., ' .-;|#', '')"/>
</xsl:call-template>
<xsl:if test="position() != last()">
<span class="separator"><xsl:text>, </xsl:text></span>
my ($file_handle) = @_;
print {$file_handle} <<"FOOTER";
<xsl:otherwise>
- <xsl:text>Unknown language code</xsl:text>
+ <!-- when 041\$a is mapped to an authorised value list, this will show the description -->
+ <xsl:value-of select="\$code" />
</xsl:otherwise>
</xsl:choose>
</xsl:template>