p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Go Back   p2p.wrox.com Forums > XML > XSLT
I forgot my password Register Now
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 7th, 2004, 12:47 PM
Registered User
Points: 6, Level: 1
Points: 6, Level: 1 Points: 6, Level: 1 Points: 6, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2004
Location: , CT, USA.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old April 8th, 2004, 03:58 PM
Registered User
Points: 6, Level: 1
Points: 6, Level: 1 Points: 6, Level: 1 Points: 6, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2004
Location: , CT, USA.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Any gurus out there? Or maybe this one is too hard?


Kevin
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #3 (permalink)  
Old April 13th, 2004, 06:51 AM
Friend of Wrox
Points: 2,450, Level: 20
Points: 2,450, Level: 20 Points: 2,450, Level: 20 Points: 2,450, Level: 20
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: , , United Kingdom.
Posts: 1,212
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding and Sorting nodes georgemeng XSLT 4 December 1st, 2008 12:13 PM
Sorting some nodes by attribute value acw274 XSLT 8 July 2nd, 2008 02:22 AM
A simple Sorting question bonekrusher XSLT 2 November 25th, 2007 09:40 AM
Sorting on similar tags question terrypink XSLT 21 April 2nd, 2007 03:55 PM
Data View Sorting Question jazzcatone ASP.NET 1.0 and 1.1 Basics 0 October 3rd, 2006 10:42 AM



All times are GMT -4. The time now is 06:25 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc