This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes XSL Sorting inside for-each Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XSL Sorting inside for-each" Watch "XSL Sorting inside for-each" New topic

XSL Sorting inside for-each

Nishant Pandian

Joined: Sep 25, 2012
Posts: 9
Hey Guys,

I have a condition . The following code returns a set of records. My requirement is that it has to sorted out in an ascending order n then sent.

THe output has to sorted out based on "ProcessOrder" element.

Kindly help me out with this... Thanks in advance.
g tsuji
Ranch Hand

Joined: Jan 18, 2011
Posts: 499
You can try this.

If @value's are number and that you want to sort in number type, add an attribute to xsl:sort element, namely, data-type="number".
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: XSL Sorting inside for-each
Similar Threads
xslt looping according to a value
Transforming web.xml
Transforming and Splitting data in a file
XSL 2.0 (looking for ideas)
Exit condition in an XSL for loop - need help