Sunday December 26, 2004 | Scotty's Engineering Log Scott Hudson's blog on XML, DocBook, Sci-Fi and Storm Chasing |
|
|
|
All
|
DocBook
|
General
|
Lego
|
Music
|
Sci-Fi
|
Space
|
SysHandbook
|
TopicMaps
|
Weather
|
XML
|
XSLT
Songs of the Season
Hope you all had a wonderful Christmas! Here's what we were listening to (transformed using my playlist stylesheets:): Christmas Favorites
Should be iRobot's official movie soundtrack
I saw the latest summer blockbuster, iRobot last night. I'm not well-read enough in Asimov to determine how close it is to his book, but the movie was entertaining. I have a feeling the disclaimer "Suggested by the book by Isaac Asimov" means that the title is the same, and they both had robots... I wonder if the droids in Star Wars are 3 laws compliant? Certainly not for IG-88 and 4-LOM (bounty hunter droids). What about Data and Lore? Did Dr. Soongh implement the 3 laws? As for iRobot, they should have used this album for the official movie soundtrack: Kraftwerk - The Mix
The opening credits of the movie could have used "The Robots", the big car chase scene "Autobahn", the love angst scenes with "Computer Love", the home delivery of the new N-5's with "Home Computer", and the revolution with "Radioactivity". Finally, the end credits could have used "Musique Non-Stop". Speaking of end credits, where was Will Smith's new catchy tune? Maybe he should have done a cover of The Robots by Kraftwerk... (2004-08-06 08:24:00.0) Permalink Comments [1] See also: Music
More 80s
Here's today's playlist, exported as XML from iTunes, and transformed using my playlist stylesheets: Mostly 80s tunes, but with some 90s thrown in for fun and variety. Scott's Fav 80s 2
80s for today
Temps might be in the 80s, too, but that's an entirely different scale... ;-) Here's today's playlist, exported as XML from iTunes, and transformed using my playlist stylesheets: Scott's Fav 80s
Jazz Favorites
Here's today's playlist, exported as XML from iTunes, and transformed using my playlist stylesheets: Scott's Fav Jazz
iTunes XML revisited
Thanks to some useful comments from Norm Walsh, I was able to make some major strides in transforming iTunes' pracically useless XML. Due to the way Apple chose to structure the iTunes XML playlist export, I ran into some problems with Norm's approach: I kept getting invalid QName errors on some of the elements. Turns out, it was trying to create element names based only on the track number. I hacked around and here is the resulting stylesheet: itunes.xslt I still need to set up the XML pipeline, as Norm suggested, but for now, here is a simple output stylesheet as well: playlist.xslt I plan to handle most of the formatting with CSS at a later date. The only problem with this XSL, is that I've now lost the order of the original playlist. I imagine this could be solved with keys and sorting, but I just don't have time to mess with this further. Hope you enjoy this! I'll be posting my playlists much more easily now. BTW, I used Michael Kay's Saxon 8.0 for the transformations! (2004-07-14 13:44:42.0) Permalink See also: Music
iTunes XML practically useless
I wanted to do some cool XSL styling of my playlists that are exported from iTunes in XML. Upon looking at the export file, however, I can't help but wonder why Apple, the king of usability, so poorly structured the file, that it's not very useful. Here's an example: <?xml version="1.0" encoding="UTF-8"?> <!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.6</string> <key>Music Folder</key><string>file://blah</string> <key>Library Persistent ID</key><string>A1A1A1A1A1A1A1A1</string> <key>Tracks</key> <key>44</key> <dict> <key>Track ID</key><integer>44</integer> <key>Name</key><string>Axel F</string> <key>Artist</key><string>Harold Faltermeyer</string> <key>Album</key><string>Hits Of 1985</string> <key>Genre</key><string>Soundtrack</string> <key>Kind</key><string>AAC audio file</string> <key>Size</key><integer>2982666</integer> <key>Total Time</key><integer>183228</integer> <key>Track Number</key><integer>8</integer> <key>Track Count</key><integer>12</integer> <key>Date Modified</key><date>2004-01-30T04:46:44Z</date> <key>Date Added</key><date>2004-01-27T03:15:52Z</date> <key>Bit Rate</key><integer>128</integer> <key>Sample Rate</key><integer>44100</integer> <key>Play Count</key><integer>3</integer> <key>Play Date</key><integer>-1134773809</integer> <key>Play Date UTC</key><date>2004-02-21T13:31:27Z</date> <key>Rating</key><integer>100</integer> <key>Normalization</key><integer>316</integer> <key>Compilation</key><true/> <key>Disabled</key><true/> <key>File Type</key><integer>1295270176</integer> <key>File Creator</key><integer>1752133483</integer> <key>Location</key><string>file://blah</string> <key>File Folder Count</key><integer>4</integer> <key>Library Folder Count</key><integer>1</integer> </dict> </dict> </plist> The key and integer pairs aren't terribly useful. If you have a standard set of data you are tracking in these files, why not make them elements and give them useful names? For example, why not export it like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE play_list PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<play_list version="1.0">
<iTunes>
<major_version>1</major_version>
<minor_version>1</minor_version>
<app_version>4.6</app_version>
<music_folder>file://blah</music_folder>
<library_ID>A1A1A1A1A1A1A1A1</string>
<tracks>40</tracks>
</iTunes>
<list_track>
<track_ID>44</track_ID>
<track_title>Axel F</track_title>
<artist>Harold Faltermeyer</artist>
<album>Hits Of 1985</album>
<cddb_id>http://www.gracenote.com/xm/pcd/genrock/459dcb773ee5459782b61a81615b4fd0.html</cddb_id>
<genre>Soundtrack</genre>
<format>AAC audio file</format>
<size>2982666</size>
<track_length>183228</track_length>
<track_number>8</track_number>
<track_count>12</track_count>
<date_modified>2004-01-30T04:46:44Z</date_modified>
<date_added>2004-01-27T03:15:52Z</date_added>
<bit_rate>128</bit_rate>
<sample_rate>44100</sample_rate>
<play_count>3</play_count>
<play_date>2004-02-21T13:31:27Z</play_date>
<rating>100</rating>
<normalization>316</normalization>
<compilation>true</compilation>
<disabled>true</disabled>
<file_type>1295270176</file_type>
<file_creator1752133483</file_creator>
<location>file://blah</location>
<file_folder_count>4</file_folder_count>
<library_folder_count>1</library_folder_count>
</list_track>
</play_list>
Now that wasn't so hard was it? Now how do we get Apple to change the format? (2004-07-13 08:16:54.0) Permalink Comments [2] See also: Music |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||