[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Help XSL Transformation of Data

Subject: Help XSL Transformation of Data
From: Rajesh Jain <rjain15@xxxxxxxxx>
Date: Fri, 25 Sep 2009 16:31:16 -0700 (PDT)
 Help XSL Transformation of Data
Hi

I need help to transform the XML data to plot a graph. 

The metrics data has to be pulled outside and organized by Time. 

The Metric Counter names (CPU, Disk, Memory) are dynamic, I mean, I could get five metrics next time.

Please tell me how to pull data by the Names and organize by Time.





<Chart-Data> 
<Root> 
  <Item ID="Server"> 
   <Statistics > 
        <Item Time="1253419200000"> 
          <Metrics> 
             <CPU TotalValue="20.0"/ > 
             <Disk TotalValue="10.0" / > 
             <Memory TotalValue="20.0" / > 
          </Metrics > 
        </Item > 
        <Item Time="1253419211000"> 
          <Metrics> 
             <CPU TotalValue="40.0"/ > 
             <Disk TotalValue="60.0" / > 
             <Memory TotalValue="10.0" / > 
          </Metrics > 
        </Item > 
    </Statistics> 
  </Item> 
</Root> 
<Chart-Data> 

This has to be Transformed in this XSL output 

<chart_data> 
                <row> 
                        <null/> 
                        <string>10</string> 
                        <string>11</string> 
                </row> 
                <row> 
                        <string>CPU</string> 
                        <number >20</number> 
                        <number >40</number> 
                </row> 
                <row> 
                        <string>Memory</string> 
                        <number>20</number> 
                        <number >10</number> 
                </row> 
                <row> 
                        <string>Disk</string> 
                        <number >10</number> 
                        <number>60</number> 
                </row> 
</chart_data>

Thanks

Rajesh

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2011 All Rights Reserved.