DIGIFORMS
Digiforms Designer Documentation
Search
About
+
Getting started
+
Howto
Help by samples
+
Objects
+
Page template
Capture or output data in a defined layout
+
XML
Extensible Markup Language
Howto
XSLT and XPath
Finding maximum value
Getting the maximum node-value in a set of nodes
Using XPath 1.0
<doc> <item number="7"></item> <item number="9"></item> <item number="2"></item> </doc>
XML
<xsl:value-of select="/doc/item[not(../item/@number > @number)]/@number"/>
xslt / xpath 1.0
Using XPath 2.0
Using the max() function
<xsl:value-of select="/doc/item[@number = max(../item/@number)]/@number/">
xslt / xpath 2.0
Edit article