mycore
mycore copied to clipboard
MCR-3082 classification label in specific language
Can we reduce duplicated code and rewrite the current-functions as folllows?
<xsl:function name="mcrclass:current-label-text" as="xs:string?">
<xsl:param name="class" as="element()?" />
<xsl:sequence select="mcrclass:label-text($CurrentLang, $class)" />
</xsl:function>
<xsl:function name="mcrclass:current-label" as="element()?">
<xsl:param name="class" as="element()?" />
<xsl:sequence select="mcrclass:label($CurrentLang, $class)" />
</xsl:function>
Can we reduce duplicated code and rewrite the current-functions as folllows?
<xsl:function name="mcrclass:current-label-text" as="xs:string?"> <xsl:param name="class" as="element()?" /> <xsl:sequence select="mcrclass:label-text($CurrentLang, $class)" /> </xsl:function> <xsl:function name="mcrclass:current-label" as="element()?"> <xsl:param name="class" as="element()?" /> <xsl:sequence select="mcrclass:label($CurrentLang, $class)" /> </xsl:function>
We have https://github.com/MyCoRe-Org/mycore/pull/2144 for testing XSL functions. I would wait for this PR to be included and then write test to ensure unchanged behaviour.