Category: error XML Definition: math.max.xml Function or Template: template
This use case shows an error when the function is passed a
number as the value of the nodes
parameter.
Use CaseSource (view)<values>
<value>7</value>
<value>11</value>
<value>8</value>
<value>4</value>
</values> Stylesheet (view)<xsl:output method="text" />
<xsl:template match="values">
<xsl:text>Maximum: </xsl:text>
<xsl:call-template name="math:max">
<xsl:with-param name="nodes"
select="number(value)" />
</xsl:call-template>
</xsl:template> Change HistorySubmitted: 2001-03-28 Creator: Jeni Tennison(http://www.jenitennison.com) Returns the maximum value from a node-set. Version | Modified | By | Details |
---|
1.1 | 2001-04-28 | Jeni Tennison | - Added condition that
math:max() must return NaN if any of the values of the nodes in the node set passed as the argument have a numerical value of NaN . - Changed the definition of the maximum to be the value of the first node in the node list when sorted as with
xsl:sort with a data type of number in descending order.
| 1.2 | 2001-05-22 | Jeni Tennison | - Added vendor implementations in Saxon and 4XSLT
- Changed status to stable
| 1.3 | 2001-06-11 | Jeni Tennison |
Added vendor implementation in jd.xslt.
| 1.4 | 2001-08-23 | Jeni Tennison |
Added vendor implementation in libxslt.
| 1.5 | 2002-08-20 | Craig Stewart | Added Xalan-J implementation to the list. | 1.6 | 2002-11-12 | Craig Stewart | Updated 4XSLT version to 0.12.0a3. |
CopyrightThis material is in the public domain. |