Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries [Thread Prev] >Thread Next - Re: stumped on XSL tranformation to produce normalized bar graph stumped on XSL tranformation to produce normalized bar graphTo: NULL Date: 6/22/2009 1:57:00 PM Hi, I'm new to XSL and have been given an assignment which has me stumed. I'm hoping you could assist. I've been given a set of XML data (see format below) and have been asked to produce a normalized bar grap in html for output. <xml> <rs:data> <z:row class='book' title='nice book' status='open' /> <z:row class='book' title='good book' status='closed' /> <z:row class='book' title='aweful book' status='closed' /> <z:row class='vase' title='blue vase' status='open' /> <z:row class='vase' title='red vase' status='closed' /> <z:row class='vase' title='green vase' status='open' /> </rs:data> </xml> The idea would be to have for each data row grouped per class and the relative number of statuses computed. Based on the above input the expected output would be as follows. <table> <tr><th>class</th><th span=2>graph</th></tr> <tr><td>book</th><td width='33%'>open<td><td width='67%'>closed<td></ tr> <tr><td>vase</th><td width='33%'>open<td><td width='67%'>closed<td></ tr> </table> It should be noted that the number of different values the status attribute can take can vary (ie. it can be more than just open an closed as in the example above). If you feel writing up XSL for this is trivial then your help would be greatly appreciated. - Thomas | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
