Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Please help to write an xsl which converts src xml to dest xml

Reply
Thread Tools

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

 
 
ramadevimandala ramadevimandala is offline
Junior Member
Join Date: Apr 2009
Posts: 1
 
      04-16-2009
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
int urldecode(char *src, char *last, char *dest) gert C Programming 20 02-16-2007 11:28 PM
RE: Speed of shutil.copy vs os.system("copy src dest") in win32 Tim Golden Python 0 04-27-2006 07:41 AM
Speed of shutil.copy vs os.system("copy src dest") in win32 Russell Warren Python 1 04-27-2006 07:17 AM
Please help with bug in my function - converts int to string Ivar C++ 13 11-17-2005 03:13 PM
memcpy( dest, src, 0 ) Spacen Jasset C Programming 8 07-01-2004 11:31 PM



Advertisments