[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] How to sort attributes to find min and max?


Subject: [xsl] How to sort attributes to find min and max?
From: "Z W" <mpc8250@xxxxxxxxx>
Date: Fri, 21 Mar 2008 19:28:15 -0700

Hi


How do I to find min and max of an attribute based on another
attribute ?
My select below doesn't seem to work and causing jvm to run out of
memory.
<xsl:value-of select="document($previousJTL)/Results/*[@label =
'Init']/@time" />


Ideally, I like to be able to get min and max for each message.
In this case,
Init min is 235, max is 2345
Update min is 2043, max is 2043


Seek some help.
Any help is appreciated.


Input file
<?xml version="1.0" encoding="UTF-8"?>
<Results version="1.2">


<sampleResult timeStamp="1205507229423" label="Init" time="2133"
responseMessage="OK" responseCode="200" success="true"/>
<sampleResult timeStamp="1205507229265" label="Init" time="2345"
responseMessage="OK" responseCode="200" success="true"/>
<sampleResult timeStamp="1205507229539" label="Update Process"
time="2043" responseMessage="OK" responseCode="200" success="true"/>
<sampleResult timeStamp="1205507229639" label="Update Process"
time="2043" responseMessage="OK" responseCode="200" success="true"/>
<sampleResult timeStamp="1205507229765" label="Init" time="235"
responseMessage="OK" responseCode="200" success="true"/>


Current Thread