mycore icon indicating copy to clipboard operation
mycore copied to clipboard

MCR-3082 classification label in specific language

Open michael-becker opened this issue 10 months ago • 2 comments

Link to jira.

michael-becker avatar Apr 16 '24 11:04 michael-becker

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>

rsteph-de avatar Apr 18 '24 09:04 rsteph-de

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.

michael-becker avatar Apr 26 '24 08:04 michael-becker