Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

XSL transformation

 
neha gowda
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI ALL

<RESOURCETOTAL>
<ALLOCATION START="2008-03-01" FTE="1.0" />
<ALLOCATION START="2008-04-01" FTE="1.0" />
<ALLOCATION START="2008-05-01" FTE="0.56" />
<ALLOCATION START="2008-06-01" FTE="0.5" />
<ALLOCATION START="2008-07-01" FTE="1.0" />
<ALLOCATION START="2008-08-01" FTE="0.5" />
<ALLOCATION START="2008-02-01" FTE="1.0" />
<ALLOCATION START="2008-03-01" FTE="2.0" />
<ALLOCATION START="2008-04-01" FTE="3.75" />
<ALLOCATION START="2008-05-01" FTE="2.0" />
<ALLOCATION START="2008-06-01" FTE="1.5" />
<ALLOCATION START="2008-07-01" FTE="1.5" />
<ALLOCATION START="2008-08-01" FTE="0.5" />
<ALLOCATION START="2008-09-01" FTE="0.25" />
<ALLOCATION START="2008-10-01" FTE="0.12" />
</RESOURCETOTAL>

I'm generating this xml using a xsl. I have to add FTE values with same date
and the XML shd be

<RESOURCETOTAL>
<ALLOCATION START="2008-03-01" FTE="3.0" />
<ALLOCATION START="2008-04-01" FTE="4.75" />
<ALLOCATION START="2008-05-01" FTE="2.56" />
<ALLOCATION START="2008-06-01" FTE="2.0" />
<ALLOCATION START="2008-07-01" FTE="3.0" />
<ALLOCATION START="2008-08-01" FTE="0.5" />
<ALLOCATION START="2008-02-01" FTE="1.0" />
<ALLOCATION START="2008-09-01" FTE="0.25" />
<ALLOCATION START="2008-10-01" FTE="0.12" />
</RESOURCETOTAL>

How do I do it.

Thanks
Neha
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have tried applying xsl:sort over start attribute in the xsl:for-each loop ??

if you are a beginner for xslt, please have a look at this tutorial http://www.w3schools.com/xsl/default.asp
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic