View Single Post
  #2 (permalink)  
Old March 4th, 2012, 05:46 AM
mhkay's Avatar
mhkay mhkay is offline
Wrox Author
Points: 17,773, Level: 58
Points: 17,773, Level: 58 Points: 17,773, Level: 58 Points: 17,773, Level: 58
Activity: 9%
Activity: 9% Activity: 9% Activity: 9%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,839
Thanks: 0
Thanked 267 Times in 262 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