"Podcast to .m3u" converter
Written by Patrik Gfeller (adm)   
Tuesday, 01 May 2007

 <?xml version="1.0" encoding="ISO-8859-1"?>
<!--
****************************************************
* (c) 2007 by CodeOmega (tm), Patrik Gfeller (pgf) *
****************************************************
Version:  1.02
  -->
 <xsl:stylesheet version = '1.0'
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">
<!-- we emit plain text (w/o the <?xml > header) -->
 <xsl:output method="text"/>

 <xsl:template match="channel">#EXTM3U<xsl:text>&#10;</xsl:text><xsl:apply-templates /></xsl:template>

 <xsl:template match="title"></xsl:template>
 <xsl:template match="description"></xsl:template>
 <xsl:template match="link"></xsl:template>
 <xsl:template match="language"></xsl:template>
 <xsl:template match="lastBuildDate"></xsl:template>
 <xsl:template match="generator"></xsl:template>
 <xsl:template match="webMaster"></xsl:template>
 <xsl:template match="copyright"></xsl:template>
 <xsl:template match="ttl"></xsl:template>
 <xsl:template match="item">#EXTINF: <xsl:value-of select="string(substring(itunes:duration,4,2) * 60 + substring(itunes:duration,8,2))" />, <xsl:value-of select="itunes:subtitle" /> <xsl:text>&#10;</xsl:text>
   <xsl:value-of select="./guid" /> <xsl:text>&#10;</xsl:text>
 </xsl:template>
<!-- ignore itunes namespace-->
<xsl:template match="itunes:*"></xsl:template>
<xsl:strip-space elements="*"/>
</xsl:stylesheet>

Last Updated ( Monday, 07 May 2007 )