Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


stumped on XSL tranformation to produce normalized bar graph

From: Thomas V <thomas@-------.--->
To: 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


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent