Pentaradiosendungsthemen in Pentaradionewstitel
Sauberer Podcast, validiert bis auf ftp-URLs git-svn-id: svn://svn.c3d2.de/c3d2-web/trunk@617 31f61c52-7bfb-0310-b897-fc00f8a278f0
This commit is contained in:
parent
52ae067dd3
commit
98bfa84e54
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE item SYSTEM "http://www.c3d2.de/dtd/c3d2web.dtd">
|
||||
<?xml-stylesheet type="text/xsl" href="../../xsl/html.xsl" ?>
|
||||
<item title="(((c3d2))) pentaradio24" date="2007-03-13T13:37:00" author="Astro">
|
||||
<item title="pentaradio24: Anonym durchs Internet" date="2007-03-13T13:37:00" author="Astro">
|
||||
<p>
|
||||
Heute abend, am 13. März, gibts auf der Frequenz von <link href="http://www.coloradio.org/">Coloradio</link> wieder <em>Pentaradio24</em>, dieses Mal mit dem Thema <em>"Anonym durchs Internet"</em>.
|
||||
</p>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE item SYSTEM "http://www.c3d2.de/dtd/c3d2web.dtd">
|
||||
<?xml-stylesheet type="text/xsl" href="../../xsl/html.xsl" ?>
|
||||
<item title="(((c3d2))) pentaradio24" date="2007-04-03T20:40:00" author="Astro">
|
||||
<item title="pentaradio24: Datenspuren 2007" date="2007-04-03T20:40:00" author="Astro">
|
||||
<p>
|
||||
Heute gibts wieder Pentaradio auf <link href="http://www.coloradio.org/">Coloradio</link>. Thema: <link href="http://www.datenspuren.de/">Datenspuren 2007</link>!
|
||||
</p>
|
||||
|
|
116
xsl/podcast.xsl
116
xsl/podcast.xsl
|
@ -25,11 +25,11 @@
|
|||
<channel>
|
||||
<title>C3D2 Podcast</title>
|
||||
<link><xsl:value-of select="$baseurl"/>radio.html</link>
|
||||
<copyright>http://creativecommons.org/licenses/by-sa/2.0/de/</copyright>
|
||||
<description>Pentaradio als MP3</description>
|
||||
<language>de</language>
|
||||
<copyright>http://creativecommons.org/licenses/by-sa/2.0/de/</copyright>
|
||||
<itunes:subtitle>Pentaradio als MP3</itunes:subtitle>
|
||||
<itunes:summary>Radio vom CCC Dresden</itunes:summary>
|
||||
<language>de</language>
|
||||
<itunes:image href="{$baseurl}images/ck.png" />
|
||||
<itunes:category text="Society & culture"/>
|
||||
<itunes:category text="Talk">
|
||||
|
@ -41,7 +41,7 @@
|
|||
<!--xsl:if test="position() <= 10"-->
|
||||
<xsl:if test="count(document(.)/item/resource) > 0">
|
||||
|
||||
<xsl:apply-templates select="document(.)/item">
|
||||
<xsl:apply-templates select="document(.)/item/resource" mode="preselect">
|
||||
<xsl:with-param name="newsfile" select="."/>
|
||||
</xsl:apply-templates>
|
||||
|
||||
|
@ -52,8 +52,71 @@
|
|||
</rss>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="item">
|
||||
<!-- Preselect heißt:
|
||||
* Gucken, ob es in der Resource nicht ein Alternative gibt, welches MP3 ist
|
||||
* Dann dieses nehmen
|
||||
* Ansonsten die Resource nehmen
|
||||
-->
|
||||
<xsl:template match="resource" mode="preselect">
|
||||
<xsl:param name="newsfile"/>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="count(alternative[@type='audio/mpeg']) > 0">
|
||||
<xsl:apply-templates test="alternative[@type='audio/mpeg'][1]">
|
||||
<xsl:with-param name="newsfile" select="$newsfile"/>
|
||||
</xsl:apply-templates>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:apply-templates select=".">
|
||||
<xsl:with-param name="newsfile" select="$newsfile"/>
|
||||
</xsl:apply-templates>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="resource">
|
||||
<xsl:param name="newsfile"/>
|
||||
|
||||
<xsl:call-template name="generate-item">
|
||||
<xsl:with-param name="newsfile" select="$newsfile"/>
|
||||
<xsl:with-param name="item_title" select="../@title"/>
|
||||
<xsl:with-param name="resource_title" select="@title"/>
|
||||
<xsl:with-param name="author" select="../@author"/>
|
||||
<xsl:with-param name="date" select="../@date"/>
|
||||
<xsl:with-param name="resource_url" select="@url"/>
|
||||
<xsl:with-param name="resource_size" select="@size"/>
|
||||
<xsl:with-param name="resource_type" select="@type"/>
|
||||
<xsl:with-param name="guid_is_permalink" select="count(../resource) = 1"/>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="alternative">
|
||||
<xsl:param name="newsfile"/>
|
||||
|
||||
<xsl:call-template name="generate-item">
|
||||
<xsl:with-param name="newsfile" select="$newsfile"/>
|
||||
<xsl:with-param name="item_title" select="../../@title"/>
|
||||
<xsl:with-param name="resource_title" select="../@title"/>
|
||||
<xsl:with-param name="author" select="../../@author"/>
|
||||
<xsl:with-param name="date" select="../../@date"/>
|
||||
<xsl:with-param name="resource_url" select="@url"/>
|
||||
<xsl:with-param name="resource_size" select="@size"/>
|
||||
<xsl:with-param name="resource_type" select="@type"/>
|
||||
<xsl:with-param name="guid_is_permalink" select="count(../../resource) = 1"/>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="generate-item">
|
||||
<xsl:param name="newsfile"/>
|
||||
<xsl:param name="item_title"/>
|
||||
<xsl:param name="resource_title"/>
|
||||
<xsl:param name="author"/>
|
||||
<xsl:param name="date"/>
|
||||
<xsl:param name="resource_url"/>
|
||||
<xsl:param name="resource_size"/>
|
||||
<xsl:param name="resource_type"/>
|
||||
<xsl:param name="guid_is_permalink"/>
|
||||
|
||||
<item>
|
||||
<xsl:variable name="href">
|
||||
<xsl:value-of select="$baseurl"/>
|
||||
|
@ -61,40 +124,37 @@
|
|||
<xsl:text>.html</xsl:text>
|
||||
</xsl:variable>
|
||||
|
||||
<title><xsl:value-of select="@title"/></title>
|
||||
<title><xsl:value-of select="$resource_title"/></title>
|
||||
<link><xsl:value-of select="$href"/></link>
|
||||
<author><xsl:value-of select="@author"/></author>
|
||||
|
||||
<guid isPermaLink="true"><xsl:value-of select="$href"/></guid>
|
||||
<enclosure
|
||||
url="{translate($resource_url, ' ', '+')}"
|
||||
length="{$resource_size}"
|
||||
type="{$resource_type}"
|
||||
/>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="$guid_is_permalink">
|
||||
<guid isPermaLink="true"><xsl:value-of select="$href"/></guid>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<guid isPermaLink="false"><xsl:value-of select="$resource_url"/></guid>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
<pubDate>
|
||||
<xsl:call-template name="date-to-rfc822">
|
||||
<xsl:with-param name="date" select="@date"/>
|
||||
<xsl:with-param name="date" select="$date"/>
|
||||
</xsl:call-template>
|
||||
</pubDate>
|
||||
|
||||
<xsl:apply-templates select="resource" mode="preselect"/>
|
||||
<!-- iTunes-Extensions zum Schluss, sonst validiert es nicht -->
|
||||
|
||||
<itunes:subtitle><xsl:value-of select="$item_title"/></itunes:subtitle>
|
||||
<!-- RSS author möchte immer Mail-Adresse, deshalb lieber itunes:author -->
|
||||
<itunes:author><xsl:value-of select="$author"/></itunes:author>
|
||||
|
||||
</item>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="resource" mode="preselect">
|
||||
<xsl:choose>
|
||||
<xsl:when test="count(alternative[@type='audio/mpeg']) > 0">
|
||||
<xsl:apply-templates test="alternative[@type='audio/mpeg'][1]"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:apply-templates select="."/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="*[name(.) = 'resource' or name(.) = 'alternative']">
|
||||
<enclosure
|
||||
url="{translate(@url, ' ', '+')}"
|
||||
length="{@size}"
|
||||
type="{@type}"
|
||||
/>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
|
Loading…
Reference in New Issue