Modules | Supported Version: 1 Source<exsl:function name="math:highest">
<xsl:param name="nodes"
select="/.." />
<xsl:choose>
<xsl:when test="$nodes and not($nodes[number(.) != number(.)])">
<xsl:variable name="max">
<xsl:for-each select="$nodes">
<xsl:sort data-type="number"
order="descending" />
<xsl:if test="position() = 1">
<xsl:value-of select="number(.)" />
</xsl:if>
</xsl:for-each>
</xsl:variable>
<exsl:return select="$nodes[. = $max]" />
</xsl:when>
<xsl:otherwise>
<exsl:return select="/.." />
</xsl:otherwise>
</xsl:choose>
</exsl:function>Change HistorySubmitted: 2001-03-28
CopyrightThis material is in the public domain. |
http://www.exslt.org/math/functions/highest/math.highest.function.xsl.html last modified 2002-11-12