View Single Post
  #2 (permalink)  
Old June 21st, 2009, 04:41 AM
mhkay's Avatar
mhkay mhkay is offline
Wrox Author
Points: 12,735, Level: 48
Points: 12,735, Level: 48 Points: 12,735, Level: 48 Points: 12,735, Level: 48
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 3,923
Thanks: 0
Thanked 82 Times in 80 Posts
Default

A few points.

Are you using XSLT 1.0 or 2.0? You stylesheet says version="2.0". If that's the case, you don't need to use the complicated Muenchian grouping approach, you can use the much simpler xsl:for-each-group instruction.

Secondly, when posting to a forum like this, please simplify the problem to get rid of inessentials. We don't need to see a list of forty fields, when the problem would be exactly the same with four. Simplifying it not only helps us to understand the problem more easily, it also helps you to understand it.

Finally, XSLT code is a lot more readable if you use literal result elements. Instead of <xsl:element name="x" namespace=""/>, write <x/>.
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
Reply With Quote
The Following User Says Thank You to mhkay For This Useful Post:
navik_pathak (June 21st, 2009)