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

Re: Return the max value of a set of nodes using FLWR

Subject: Re: Return the max value of a set of nodes using FLWR
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Fri, 25 May 2012 08:16:05 -0400
Re:  Return the max value of a set of nodes using FLWR
At 2012-05-25 08:10 -0400, Philip Vallone wrote:
How can I return the max value of a set of nodes using FLWR? In this example I want to return:
<xsl:sequence select="for $x in changenumber return number(max($x))"/>

You've gone too deep ... you want to stop one level "up" and get the maximum of each of the sets.

I hope this helps.

. . . . . . Ken

T:\ftemp>type philip.xml

T:\ftemp>xslt2 philip.xml philip.xsl
<?xml version="1.0" encoding="UTF-8"?>3 2 0
T:\ftemp>type philip.xsl
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  <xsl:template match="/">
    <xsl:sequence select="for $s in /data/set return max($s/changenumber)"/>

-- Public XSLT, XSL-FO, UBL and code list classes in Europe -- Oct 2012 Contact us for world-wide XML consulting and instructor-led training Free 5-hour lecture: http://www.CraneSoftwrights.com/links/udemy.htm Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Google+ profile: https://plus.google.com/116832879756988317389/about Legal business disclaimers: http://www.CraneSoftwrights.com/legal

Current Thread


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.
First Name
Last Name
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.