|
|
 |
| XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the XSLT section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
|
 |

April 7th, 2004, 12:47 PM
|
|
Registered User
|
|
Join Date: Apr 2004
Location: , CT, USA.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
HELP! More complicate sorting nodes question
I have the xml as follows:
<class name="2001">
<student sex="F">Ann</student>
<student sex="M">Bob</student>
<student sex="F">Cindy</student>
<student sex="F">Dianne</student>
<student sex="M">Eric</student>
...
</class>
<class name="2002">
<student sex="M">Frank</student>
<student sex="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
__________________
Kevin
|

April 8th, 2004, 03:58 PM
|
|
Registered User
|
|
Join Date: Apr 2004
Location: , CT, USA.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Any gurus out there? Or maybe this one is too hard?
Kevin
|

April 13th, 2004, 06:51 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Location: , , United Kingdom.
Posts: 1,212
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I assume you're having problems with the FMFMFM... sorting? Your problem reminds me of this topic http://p2p.wrox.com/topic.asp?TOPIC_ID=4714
does that solution help?
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |