[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Get the maximum of a set of values

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

I've got the following problem:

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

<!-- index file -->
<index>
	<entry><xml>X1</xml>...</entry>
	<entry><xml>X2</xml>...</entry>
	<entry><xml>X3</xml>...</entry>
	... <!-- and others -->
</index>

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

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

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

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" />
</xsl:for-each>

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?!

Thanks

BirgitZ



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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.