jQuery in Action, 3rd edition
The moose likes XML and Related Technologies and the fly likes Grouping using XSLT 2.0  (question for Dmitry Kirsanov) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Grouping using XSLT 2.0  (question for Dmitry Kirsanov)" Watch "Grouping using XSLT 2.0  (question for Dmitry Kirsanov)" New topic

Grouping using XSLT 2.0 (question for Dmitry Kirsanov)

sateesh arumbaka

Joined: Nov 22, 2002
Posts: 6
I tried grouping with XSLT but couldnt get it to work,

I heard that XSLT 2.0 has some special functions/support for grouping.
Can you please explain this with an example.

[ July 15, 2004: Message edited by: sateesh arumbaka ]
Dmitry Kirsanov
Ranch Hand

Joined: Apr 26, 2004
Posts: 33
The definitive (but easy to understand) grouping examples are right here:


Basically, the grouping feature may be called "for-each on steroids". The new instruction, for-each-group, works similar to for-each, but on each iteration it gives you a group of nodes instead of a single node. This group, accessed by current-group() in XPath, can be further sorted, filtered, transformed, etc. The best thing about that is that the groups may be selected based on a wide variety of tests, such as common value, adjacency, starting/ending node etc.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: Grouping using XSLT 2.0 (question for Dmitry Kirsanov)
It's not a secret anymore!