HELP! More complicate sorting nodes question
I have the xml as follows:
<class name="2001">
<student ************="F">Ann</student>
<student ************="M">Bob</student>
<student ************="F">Cindy</student>
<student ************="F">Dianne</student>
<student ************="M">Eric</student>
...
</class>
<class name="2002">
<student ************="M">Frank</student>
<student ************="F">Gina</student>
...
...
</class>
Now I want to use XSL to transform the xml to a csv file like:
Class,FemaleStudent,MaleStudent
2001,Ann,Bob,
,Cindy,Eric
,Dianne,,
...
2002,Gina,Frank,
...
So, the output will look like this in excel:
Class|Female|Male
------------------
2001
------------------
|Ann |Bob
------------------
|Cindy |Eric
------------------
|Dianne|
------------------
2002 | |
------------------
|Gina |Frank
------------------
...
The hardest part is to sort the student nodes based on ************, but the student node come randomly, also I want to write the outuput to two columns.
Will that be easier if I sort the dom before applying the xsl?
Any help would be appreciated!
Kevin
|