XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Joel AndersenSubject: Find Maximum Numeric Value in a List
Author: Joel Andersen
Date: 26 Apr 2005 04:49 PM
Hi,

I am new to XML, and I figured this is an easy question, but I could not find the answer anywhere.

I have a number of children with an element called RowNum which tracks where I am for recovery purposes.

Is there a simple function call that will return the Max RowNum value? It seems like there should be, but I can't find it...

thanks for your help!
Joel

Posttop
Tony LavinioSubject: Find Maximum Numeric Value in a List
Author: Tony Lavinio
Date: 27 Apr 2005 11:25 AM
For a simple XML document like this:
<list>
<item>1</item>
<item>3</item>
<item>5</item>
<item>4</item>
<item>2</item>
</list>
attached please find the XSL code to use. You should easily be able to
extrapolate from here.


Documentmax.xsl
Stylesheet to find max value in list

 
Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.