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

Joined
Apr 16, 2009
Messages
1
Reaction score
0
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top