Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   XML (http://www.velocityreviews.com/forums/f32-xml.html)
-   -   Please help to write an xsl which converts src xml to dest xml (http://www.velocityreviews.com/forums/t680134-please-help-to-write-an-xsl-which-converts-src-xml-to-dest-xml.html)

ramadevimandala 04-16-2009 10:14 AM

Please help to write an xsl which converts src xml to dest xml
 
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


All times are GMT. The time now is 05:38 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.