Please help to write an xsl which converts src xml to dest xml

Discussion in 'XML' started by ramadevimandala, Apr 16, 2009.

  1. ramadevimandala

    ramadevimandala

    Joined:
    Apr 16, 2009
    Messages:
    1
    Hi,
    I want to write an xsl which converts following xml to dest xml:

    source:
    <?xml version = '1.0'?>
    <ROWSET>
    <ROW num="1">
    <YEAR>2003</YEAR>
    <LEAVING_REASON>Other</LEAVING_REASON>
    <EMPLOYEES>15</EMPLOYEES>
    </ROW>
    <ROW num="2">
    <YEAR>2003</YEAR>
    <LEAVING_REASON>Benefits</LEAVING_REASON>
    <EMPLOYEES>14</EMPLOYEES>
    </ROW>
    <ROW num="18">
    <YEAR>2004</YEAR>
    <LEAVING_REASON>Other</LEAVING_REASON>
    <EMPLOYEES>8</EMPLOYEES>
    </ROW>
    <ROW num="19">
    <YEAR>2004</YEAR>
    <LEAVING_REASON>Benefits</LEAVING_REASON>
    <EMPLOYEES>17</EMPLOYEES>
    </ROW>
    <ROW num="31">
    <YEAR>2005</YEAR>
    <LEAVING_REASON>Other</LEAVING_REASON>
    <EMPLOYEES>11</EMPLOYEES>
    </ROW>
    <ROW num="32">
    <YEAR>2005</YEAR>
    <LEAVING_REASON>Benefits</LEAVING_REASON>
    <EMPLOYEES>13</EMPLOYEES>
    </ROW>
    </ROWSET>

    Dest xml:

    <chart palette="2" caption="Turnover Comparison">
    <categories>
    <category label="Other"/>
    <category label="Benefits"/>
    </categories>
    <dataset seriesName="2003" color="AFD8F8" showValues="0">
    <set value="15"/>
    <set value="14"/>
    </dataset>
    <dataset seriesName="2004" color="F6BD0F" showValues="0">
    <set value="8"/>
    <set value="17"/>
    </dataset>
    <dataset seriesName="2005" color="8BBA00" showValues="0">
    <set value="11"/>
    <set value="13"/>
    </dataset>
    </chart>

    please help me to write the xsl for this as I am new to xsl

    Thanks,
    Rama
     
    ramadevimandala, Apr 16, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Russell Warren
    Replies:
    1
    Views:
    832
    Tim Roberts
    Apr 27, 2006
  2. Tim Golden
    Replies:
    0
    Views:
    626
    Tim Golden
    Apr 27, 2006
  3. Spacen Jasset

    memcpy( dest, src, 0 )

    Spacen Jasset, Jun 30, 2004, in forum: C Programming
    Replies:
    8
    Views:
    434
    Spacen Jasset
    Jul 2, 2004
  4. gert
    Replies:
    20
    Views:
    1,221
  5. ibm
    Replies:
    1
    Views:
    280
    Victor Bazarov
    Jun 27, 2005
Loading...

Share This Page