Description
The functx:min-node function returns the node(s) that contains the minimum value, based on typed value. Unlike the built-in fn:min 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()* |
XQuery Function DeclarationSee XSLT definition. | declare namespace functx = "http://www.functx.com";
declare function functx:min-node
( $nodes as node()* ) as node()* {
$nodes[. = min($nodes)]
} ; |
Exampleslet $in-xml := | <values>
<int>1</int>
<int>23</int>
<int>115</int>
</values> | return |
XQuery Example | Results |
---|
functx:min-node($in-xml//int) |
<int>1</int> |
See AlsoHistory |
Recommended Reading:
|