[xsl] Get the maximum of a set of values

Subject: [xsl] Get the maximum of a set of values
From: birgit.zimmermann@xxxxxxxxxxxxxxx
Date: Tue, 2 Nov 2004 21:38:41 +0100

I've got the following problem:

I've got an index xml file that refers to some other xml files like that:

<!-- index file -->
	... <!-- and others -->

<!-- X1.xml -->
	<item number="3" />

<!-- X2.xml -->
	<item number="7" />

<!-- X3.xml -->
	<item number="2" />

The XSL file I have, belongs to the index file.

In the xsl file I can get each value of the attribute number like this:
<xsl:for-each select="index/entry">
	<xsl:variable name="vXML"><xsl:value-of select="xml" />.xml</xsl:variable>
	<xsl:variable name="vNumber" select="document($vXML)/entry/item/@number" />

But my problem is, that I want to find the maximum of the attribute number / the
variable vNumber!
This value should become a global variable.

Does anyone has an idea?!



This mail sent through IMP: http://horde.org/imp/

Current Thread