EXSLT - math:highest - Version 1

Version: 1
Status: stable
User Page: index.html
XML Definition: math.highest.xml
Function Package: math.highest.zip

Function Syntax

node-set math:highest(node-set)

Template Syntax

<xsl:call-template name="math:highest">
   <xsl:with-param name="nodes" select="node-set" />
</xsl:call-template>

The math:highest function returns the nodes in the node set whose value is the maximum value for the node set. The maximum value for the node set is the same as the value as calculated by math:max. A node has this maximum value if the result of converting its string value to a number as if by the number function is equal to the maximum value, where the equality comparison is defined as a numerical comparison using the = operator.

If any of the nodes in the node set has a non-numeric value, the math:max function will return NaN. The definition numeric comparisons entails that NaN != NaN. Therefore if any of the nodes in the node set has a non-numeric value, math:highest will return an empty node set.

The math:highest template returns a result tree fragment consisting of copies of the nodes as returned by the function.

An implementation of this extension function in the EXSLT math namespace must conform to the behaviour described in this document.

Implementations

Built-in support for math:highest is available in the following XSLT processors:

ProcessorProcessor VersionImplemented Version
4XSLT, from 4Suite.0.12.0a31
SAXON from Michael Kay6.31
jd.xslt from Johannes Döbler1.0.91
libxslt from Daniel Veillard; implementation by Thomas Broyer1.0.191
Xalan-J from Apache2.4.D11

The following implementations of math:highest are available:

LanguageImplemented VersionCreatorDateDownload
EXSLT Function1Jeni Tennison2001-03-28math.highest.function.xsl
XSLT Template1Jeni Tennison2001-03-28math.highest.template.xsl

Use Cases

Use Case Package: math.highest.use-cases.zip

The following use cases illustrate the functionality of math:highest.

DetailsCalling StylesheetXML DataExpected ResultCategoryTemplate
1math.highest.1.xslmath.highest.data.1.xmlmath.highest.result.1.xmlexampleN
2math.highest.2.xslmath.highest.data.1.xmlmath.highest.result.1.xmlexampleY
3math.highest.1.xslmath.highest.data.2.xmlmath.highest.result.2.xmlboundaryN
4math.highest.2.xslmath.highest.data.2.xmlmath.highest.result.2.xmlboundaryY
5math.highest.3.xslmath.highest.data.1.xml-errorN
6math.highest.4.xslmath.highest.data.1.xml-errorY
7math.highest.5.xslmath.highest.data.5.xmlmath.highest.result.5.xmlexampleN

Change History

Submitted: 2001-03-28
Creator: Jeni Tennison(http://www.jenitennison.com)

Returns the nodes with the maximum value in a node set.

VersionModifiedByDetails
1.12001-04-28Jeni Tennison

Clarified the wording of the definition, highlighting the fact that a non-numeric value will result in an empty set being returned.

1.22001-05-22Jeni Tennison
  • Added vendor implementations in Saxon and 4XSLT
  • Changed status to stable
1.32001-06-11Jeni Tennison

Added vendor implementation in jd.xslt.

1.42001-08-23Jeni Tennison

Added vendor implementation in libxslt.

1.52002-08-20Craig Stewart

Added Xalan-J implementation to the list.

1.62002-11-12Craig Stewart

Updated 4XSLT version to 0.12.0a3.

Copyright

http://www.exslt.org/math/functions/highest/math.highest.1.html last modified 2002-11-12