Subject: Extract unique list of attributes ...
From: Raghupathy S <raghupathy.s@xxxxxxxxx>
Date: Fri, 22 Jul 2005 22:25:36 +0530
|
Hi,
I'm a total newbie to XML / XSl, and I've been stuck with this problem.
Would be grateful for any suggestions / pointers
The problem -
Assuming I have an xml file
<root>
<students>
<student grade="first">abc</student>
<student grade="first">def</student>
<student grade="second">ghi</student>
<student grade="third">jkl</student>
<student grade="third">mno</student>
</students>
</root>
I need to transform this into the following xml using an XSL
<root>
<grades>
<grade level="first"/>
<grade level="second"/>
<grade level="third"/>
</grades>
<students>
<student grade="first">abc</student>
<student grade="first">def</student>
<student grade="second">ghi</student>
<student grade="third">jkl</student>
<student grade="third">mno</student>
</students>
</root>
I apologize if this is a totally newbie question, but ive been at my
wits end all day, trying to get this working.
Any advice / help would be most appreciated.
Thanks,
Rags
|