This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes XSL/XML Transformation Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XSL/XML Transformation Question " Watch "XSL/XML Transformation Question " New topic

XSL/XML Transformation Question

Darryl McCool

Joined: Jan 03, 2001
Posts: 8
Suppose I have the following in an XML file:
<FTPSITE server="" directory="/usr/WebSphere">
<FTPSITE server="" directory="/home/db2inst1">
<USERNAME>harry johnson</USERNAME>
What I want to do using an XSL stylesheet is to output a table where every user is sorted by size. If a USERNAME occurs in different FTPSITEs, then add the SIZEs together.
So the results should be:
Ming 34000
kilgore 15000
harry johnson 6000
lary 3000
Any ideas?
Holger Prause
Ranch Hand

Joined: Oct 09, 2000
Posts: 47
you can try this but it isnt tested.I still have problems with matching nodes so i dont know if this works

<xsl:for-each select="/DATA/FTPSITE">
<xsl:value-of select="USERNAME">
<xsl:sort order="descending" select="SIZE"/>

[This message has been edited by Holger Prause (edited January 19, 2001).]
I agree. Here's the link:
subject: XSL/XML Transformation Question
Similar Threads
Deploying DS using MBeanServer and MainDeployer on the fly
date range in xsl
Problem with xml file
Excel Treating String as Date
How to upload files in Java