CC MP3 license verification RDF + XSL -> SMIL playlist

Mike Linksvayer ml at creativecommons.org
Wed Oct 29 16:40:37 EST 2003


Input extracted from RDF embedded in <http://creativecommons.org/extras/copyremix>.

XSL precedes my signature.

Output at <http://mirrors.creativecommons.org/copyremix/copyremix.smil>
(works for me with RealPlayer).

- The XSL has lots of hardcoded stuff, but demonstrates the principle.

- I'd like to do a better job of referring back to the source RDF.  My weak
   attempt -- note rdf:seeAlso in the playlist's Work element, and my swap of
   rdf:about and dc:identifier for each track's Work element.

- Someone should create a web service that takes a URL containing embedded
   verification RDF and turns it into a SMIL playlist.

- I think this is kinda cool, because the verification metadata is being used
   as a source for generating something else useful, providing an additional bonus
   for musicians who go through the currently bothersome process of implementing
   our P2P strategy <http://creativecommons.org/technology/embedding>.

Thanks to Lucas for doing the research and writing on SMIL necessary to make this
happen!



<xsl:stylesheet version="1.0"
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   xmlns:cc="http://web.resource.org/cc/">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/">
<smil>
   <head>
     <metadata id="meta-rdf">
       <rdf:RDF xmlns="http://web.resource.org/cc/"
         xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
         xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
         xmlns:dc="http://purl.org/dc/elements/1.1/">

         <Work rdf:about="http://mirrors.creativecommons.org/copyremix/copyremix.smil">
           <dc:title>"Copy Me Remix Me" Playlist</dc:title>
           <dc:format>application/smil</dc:format>
           <dc:source>http://creativecommons.org/extras/copyremix</dc:source>
           <rdfs:seeAlso rdf:resource="http://creativecommons.org/extras/copyremix"/>
           <license rdf:resource="http://creativecommons.org/licenses/by/1.0/" />
         </Work>

         <xsl:for-each select="//cc:Work">
         <Work rdf:about="{./dc:identifier}">
           <dc:identifier><xsl:value-of select="./@rdf:about"/></dc:identifier>
           <license rdf:resource="{./cc:license/@rdf:resource}" />
         </Work>
         </xsl:for-each>

         <License rdf:about="http://creativecommons.org/licenses/by/1.0/">
           <permits rdf:resource="http://web.resource.org/cc/Reproduction" />
           <permits rdf:resource="http://web.resource.org/cc/Distribution" />
           <requires rdf:resource="http://web.resource.org/cc/Notice" />
           <requires rdf:resource="http://web.resource.org/cc/Attribution" />
         </License>
         <xsl:for-each select="//cc:License">
           <xsl:copy-of select="." />
         </xsl:for-each>
       </rdf:RDF>
     </metadata>
   </head>
   <body>
     <seq>
       <xsl:for-each select="//dc:identifier">
         <audio src="{.}"/>
       </xsl:for-each>
     </seq>
   </body>
</smil>
</xsl:template>
</xsl:stylesheet>


-- 
    Mike Linksvayer
    http://creativecommons.org/learn/aboutus/people#21




More information about the cc-metadata mailing list