Jennifer Lege and I presented on iTunes. We built an opening movie using Apple's iMovie. The score tapped iTunes XML for the song "Now that We Found Love" (Heavy D and The Boyzand Aaron Hall). Using the titles function of iTunes we presented the plist structure of iTunes XML and some of the topics covered in our presentation.
Mac OS X
\Users\username\Music\iTunes\iTunes Library
\Users\username\Music\iTunes\iTunes Music Library.xml
Microsoft Windows
\Documents and Settings\username\My Documents\My Music\iTunes\iTunes Library.itl
\Documents and Settings\username\My Documents\My Music\iTunes\iTunes Music Library.xml
<!ENTITY % plistObject "(array | data | date | dict | real | integer | string | true | false )" >
<!ELEMENT plist %plistObject;>
<!ATTLIST plist version CDATA "1.0" >
<!-- Collections -->
<!ELEMENT array (%plistObject;)*>
<!ELEMENT dict (key, %plistObject;)*>
<!ELEMENT key (#PCDATA)>
<!--- Primitive types -->
<!ELEMENT string (#PCDATA)>
<!ELEMENT data (#PCDATA)> <!-- Contents interpreted as Base-64 encoded -->
<!ELEMENT date (#PCDATA)> <!-- Contents should conform to a subset of ISO 8601 (in particular, YYYY '-' MM '-' DD 'T' HH ':' MM ':' SS 'Z'. Smaller units may be omitted with a loss of precision) -->
<!-- Numerical primitives -->
<!ELEMENT true EMPTY> <!-- Boolean constant true -->
<!ELEMENT false EMPTY> <!-- Boolean constant false -->
<!ELEMENT real (#PCDATA)> <!-- Contents should represent a floating point number matching ("+" | "-")? d+ ("."d*)? ("E" ("+" | "-") d+)? where d is a digit 0-9. -->
<!ELEMENT integer (#PCDATA)>
<!-- Contents should represent a (possibly signed) integer number in base 10 -->
<dict>
<key>45</key>
<dict>
<key>Track ID</key><integer>45</integer>
<key>Name</key><string>Strange Condition</string>
<key>Artist</key><string>Pete Yorn</string>
<key>Composer</key><string>Pete Yorn</string>
<key>Album</key><string>Music For The Morning After</string>
<key>Genre</key><string>Alternative & Punk</string>
<key>Kind</key><string>AAC audio file</string>
<key>Size</key><integer>3848899</integer>
<key>Total Time</key><integer>237167</integer>
<key>Track Number</key><integer>2</integer>
<key>Track Count</key><integer>14</integer>
<key>Year</key><integer>2001</integer>
<key>Date Modified</key><date>2005-01-24T21:40:37Z</date>
<key>Date Added</key><date>2005-01-24T21:32:54Z</date>
<key>Bit Rate</key><integer>128</integer>
<key>Sample Rate</key><integer>44100</integer>
<key>Play Count</key><integer>35</integer>
<key>Play Date</key><integer>-1066743139</integer>
<key>Play Date UTC</key><date>2006-04-18T20:55:57Z</date>
<key>Normalization</key><integer>6502</integer>
<key>Persistent ID</key><string>6D0089F9F3C2DD67</string>
<key>Track Type</key><string>File</string>
<key>File Type</key><integer>1295270176</integer>
<key>File Creator</key><integer>1752133483</integer>
<key>Location</key><string>file://localhost/Users/susanrussell/Music/iTunes/iTunes%20Music/Pete%20Yorn/Music%20For%20The%20Morning%20After/02%20Strange%20Condition.m4a</string>
<key>File Folder Count</key><integer>4</integer>
<key>Library Folder Count</key><integer>1</integer>
</dict>
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html><head><title>My iTunes Songs</title><link rel="stylesheet" type="text/css" href="transtylesheet.css"/></head>
<body>
<h1>iTunes Playlist: Brooklyn</h1>
<table border="1">
<tr>
<th width="25%">Name of Song</th>
<th width="25%">Artist</th>
<th width="25%">Album</th>
<th width="25%">Genre</th>
</tr>
<xsl:for-each select="/*/*/dict[1]/dict">
<xsl:sort select="child::*[preceding-sibling::* = 'Genre']"/>
<tr>
<td><xsl:value-of select= "child::*[preceding-sibling::* = 'Name']" /></td>
<td><xsl:value-of select= "child::*[preceding-sibling::* = 'Artist']" /></td>
<td><xsl:value-of select= "child::*[preceding-sibling::* = 'Album']" /></td>
<td><xsl:value-of select= "child::*[preceding-sibling::* = 'Genre']" /></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
These files reside in the same folder as the iTunes Music Library.xml. The list is displayed when albumlist.xml is opened in the Firefox web browser.
1) In XML file called albumlist.xml
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href="display.xsl" type="text/xsl"?>
<wrapper>
<incl file="iTunes Music Library.xml "/>
</wrapper>
2) In XSL file called display.xsl
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- (c) Chris Veness 2005 -->
<xsl:output method="html" encoding="UTF-8" indent="yes"/>
<xsl:preserve-space elements="*"/>
<!-- match the wrapper and apply templates to the <incl> xml file -->
<xsl:template match="/wrapper">
<xsl:apply-templates select="document(incl/@file)"/>
</xsl:template>
<xsl:key name="songsByGenre" match="dict" use="string[preceding-sibling::key[1]='Genre']"/>
<xsl:key name="songsByAlbum" match="dict" use="string[preceding-sibling::key[1]='Album']"/>
<xsl:template match="/plist/dict/dict">
<html>
<head>
<title>iPod Album Listing</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
</head>
<body>
<table>
<xsl:for-each select="dict[generate-id(.)=generate-id(key('songsByGenre',string)[1])]">
<xsl:sort select="string[preceding-sibling::key[1]='Genre']"/>
<xsl:for-each select="key('songsByGenre',string)[1]">
<xsl:call-template name="albumsInGenre">
<xsl:with-param name="genre" select="string[preceding-sibling::key[1]='Genre']"/>
</xsl:call-template>
</xsl:for-each>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
<xsl:template name="albumsInGenre">
<xsl:param name="genre"/>
<tr><td colspan='3'><b><xsl:value-of select="$genre"/></b></td></tr>
<xsl:variable name="song" select="/plist/dict/dict/dict"/>
<xsl:for-each select="$song[generate-id(.)=
generate-id(key('songsByAlbum',string[preceding-sibling::key[1]='Album'])[1])]">
<xsl:sort select="string[preceding-sibling::key[1]='Album']"/>
<xsl:for-each select="key('songsByAlbum',string[preceding-sibling::key[1]='Album'])
[string[preceding-sibling::key[1]='Genre']=$genre]
[not(true[preceding-sibling::key[1]='Disabled'])][1]">
<tr valign='top'>
<td width='20'> </td>
<td><xsl:value-of select="string[preceding-sibling::key[1]='Album']"/></td>
<td><xsl:value-of select="string[preceding-sibling::key[1]='Artist']"/></td>
</tr>
</xsl:for-each>
</xsl:for-each>
</xsl:template>
<xsl:template match="text()"/> <!-- swallow up unmatched text -->
</xsl:stylesheet>
This is a podcast producedby the museum of Modern Art (MoMA) iTunes friendly tags are highlighted
<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:media="http://search.yahoo.com/mrss" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
<channel>
<ttl>60</ttl>
<link>http://www.moma.org/audio</link>
<title>MoMA, The Museum of Modern Art, New York</title>
<description>Hear artists, curators, and others discuss works of modern and contemporary art at MoMA, The Museum of Modern Art. New programs will be added over time including MoMAudio: Special Exhibitions, Modern Voices, Modern Kids, and Visual Descriptions. This podcast will also feature an archive of many of MoMA's Adult and Academic Programs including symposia, readings, and discussions with artists, scholars, and writers. Download your audio and come visit MoMA, The Museum of Modern Art, in New York or online at www.moma.org. Additional information about the audio programs may be found at www.moma.org/audio. Collection information and images may be found at www.moma.org/collection.</description>
<language>en-us</language>
<lastBuildDate>Fri, 17 Feb 2006 22:00:00 GMT</lastBuildDate>
<copyright>Copyright 2006, MoMA, The Museum of Modern Art</copyright>
<image>
<url>http://www.moma.org/visit_moma/images/MoMA.jpg</url>
<title>MoMA Audio</title>
<link>http://www.moma.org/audio</link>
</image>
<webMaster>audio@moma.org</webMaster>
<itunes:author>MoMA, The Museum of Modern Art</itunes:author>
<itunes:subtitle>Hear artists, curators, and others discuss works of modern and contemporary art at MoMA, The Museum of Modern Art.</itunes:subtitle>
<itunes:summary>Hear artists, curators, and others discuss works of modern and contemporary art at MoMA, The Museum of Modern Art. New programs will be added over time including MoMAudio: Special Exhibitions, Modern Voices, Modern Kids, and Visual Descriptions. This podcast will also feature an archive of many of MoMA's Adult and Academic Programs including symposia, readings, and discussions with artists, scholars, and writers. Download your audio and come visit MoMA, The Museum of Modern Art, in New York or online at www.moma.org. Additional information about the audio programs may be found at www.moma.org/audio. Collection information and images may be found at www.moma.org/collection.</itunes:summary>
<itunes:owner>
<itunes:name>MoMA, The Museum of Modern Art</itunes:name>
<itunes:email>audio@moma.org</itunes:email>
</itunes:owner>
<itunes:image href="http://www.moma.org/visit_moma/images/MoMA.jpg" />
<itunes:category text="Arts & Entertainment" />
<itunes:category text="Education" />
<itunes:keywords>MoMA, Museum of Modern Art, modern, contemporary, art, Picasso, Matisse, exhibition, collection, Andy Warhol, film, cultural events, photography, education, painting, sculpture, prints, drawing, architecture, design, Cézanne, Pollock, van Gogh</itunes:keywords>
<itunes:explicit>No</itunes:explicit>
<item>
<title>522 Fernand Léger. Contrast of Forms. 1913</title>
<description>Modern Voices: Commentaries from curators, artists, and others on signature works in the Museum's collection.</description>
<link>http://www.moma.org/collection/browse_results.php?object_id=79105</link>
<enclosure url="http://www.moma.org/visit_moma/audio/2005/mod_voices/files/0522e.mp3" length="1977251" type="audio/mpeg" />
<category>Podcasts</category>
<pubDate>Fri, 2 Mar 2006 22:00:00 GMT</pubDate>
<itunes:author>Fernand Léger</itunes:author>
<itunes:explicit>No</itunes:explicit>
<itunes:duration>00:02:21</itunes:duration>
<itunes:keywords>podcast, moma, museum, modern art, Fernand Léger</itunes:keywords>
</item>