[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

XSLT conditional sorting problem

Subject: XSLT conditional sorting problem
From: "thei" <thei@xxxxxxxxx>
Date: Tue, 11 Nov 2003 18:03:50 +1000
xslt conditional
Hello,

I'm attempting to use XSLT (via PHP and Sablotron) to transform an XML music list into XHTML. I have it mostly working, but have come across some more complex issues that I'm unable to solve.

The XSL transforms an XML music list into nested XHTML lists, sorting the output by albums. Problems arise when albums that have multiple artists are encountered, as I am unable to correctly determine how to handle these.

Currently I'm outputting data as such:

Artist - Album_1
	Song_1
	Song_2
	...
Artist - Album_2
	Song_1
	...
...

When I encounter an album by various artists, I'd like to handle it as below, but was unable to figure out how to correctly do this:

"Various Artists" - Album_1
	Artist - Song_1
	Artist - Song-2
	...


An example best explains what I'm trying to do. The current transformation can be viewed at http://the-i.org/music-albums that also contains links to both the XSLT style sheet and XML data. My problem is explained in more detail on that page so I won't repeat it here.

One additional thing, if anyone's feeling particularly intelligent and helpful - I would be interested to see how I'd sort my XML data into nested lists on both artist and album, as such:

Artist_1
	Album_1
		Song_1
		Song_2
		...
	Album_2
	...
Artist_2
...

Thanks for any help. 

Printed on 100% recycled electrons.
http://nedmartin.org/




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.