Description
The functx:max-node function returns the node(s) that contains the maximum value, based on typed value. Unlike the built-in fn:max function, it returns the node itself, not its atomic value.
Arguments and Return TypeName | Type | Description |
$nodes |
node()* |
the sequence of nodes to test |
return value |
node()* |
XSLT Function DeclarationSee XQuery definition. | <xsl:function name="functx:max-node" as="node()*"
xmlns:functx="http://www.functx.com">
<xsl:param name="nodes" as="node()*"/>
<xsl:sequence select="
$nodes[. = max($nodes)]
"/>
</xsl:function>
|
Examples<xsl:variable name="in-xml" as="item()*"> | | <values>
<int>1</int>
<int>23</int>
<int>115</int>
</values> |
| </xsl:variable> |
XPath Example | Results |
---|
functx:max-node($in-xml//int) |
<int>115</int> |
See AlsoHistory |
Recommended Reading:
|