View Single Post
  #2 (permalink)  
Old March 4th, 2012, 05:46 AM
mhkay's Avatar
mhkay mhkay is offline
Wrox Author
Points: 18,359, Level: 59
Points: 18,359, Level: 59 Points: 18,359, Level: 59 Points: 18,359, Level: 59
Activity: 80%
Activity: 80% Activity: 80% Activity: 80%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,944
Thanks: 0
Thanked 287 Times in 282 Posts
Default

I think I would tackle this with something like

Code:
<xsl:variable name="rows" select="//Row"/>
<xsl:for-each select="distinct-values(for $n in $rows/Column/@name return substring-before($n, '_Month_Total')[. != '']">
  <xsl:variable name="month"
  <Row>
     ... create row for month $month ...
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
Reply With Quote