XSLT


Since the beginning of time people have had the urge to show other people their record collections. Nobody knows why. This usually involved a lot of dragging people home and boring them to death while excitedly playing Mike Oldfield "Tubular Bells".
Thanks to the internet it is nowadays somewhat easier. I created a simple .xsl file that you can process your iTunes xml file with to generate a webpage listing all your music.
Your iTunes XML file is most likely located in
C:\Dokumente und Einstellungen\username\Eigene Dateien\Eigene Musik\iTunes\iTunes Music Library.xml
(on a windows machine, that is). On a mac, I have no idea where it is located but it should not be that hard to find out.

I have created to two .xsl files. They are the same, just sorting the result differently.
a) sorted by artist
b) sorted by play count, artist
See examples further down for what the result looks like.

You can use those to process your iTunes xml file yourself, or if you are lazy:

1) Make a copy of your iTunes xml file
2) include the line
<?xml-stylesheet type="text/xsl" href="http://www.edlin.org/xslt/itunes-to-html.xsl"?>
as the second line in the xml file.
Like this:

 <?xml version="1.0" encoding="UTF-8"?>
 <?xml-stylesheet type="text/xsl" href="http://www.edlin.org/xslt/itunes-to-html.xsl"?>
 <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 <plist version="1.0">
 <dict>
 	<key>Major Version</key><integer>1</integer>
 	<key>Minor Version</key><integer>1</integer>
 	<key>Application Version</key><string>4.8</string>
 .....
 
Leave everything else as it were in the xml file, just add that single line.
Open the modified xml file in your browser. As you see, the xml file will pull the xsl file and format it nicely. Simply upload the xml file to your website, and people can easily see what kind of music you like (or at least, what kind of music you have).
Examples:
sample_sorted_by_artist.xml
sample_sorted_by_play_count.xml

Feedback is of course as always welcome.



How to contact me
Welcome to
www.Edlin.org
Computing, CS links
Design Patterns
Distribution process
CVS, Backupscript for CVS
Perl tips, Perl links
DHTML/JavaScript/etc
Searchengines
My Bookmarklets
Nostalgia: Atari ST
HP Bluestone
Other stuff
Science Ficton/Fantasy
My Book Reviews
Author: Tom Holt
Bestselling books, May 2005
John Cleese
and much more ....
Contact