2007-04-10 05:06:51 +02:00
<?xml version="1.0" encoding="utf-8"?>
2021-04-09 22:52:19 +02:00
<!-- Spezifikationen:
2021-04-10 02:09:13 +02:00
http://www.apple.com/itunes/store/podcaststechspecs.html
2021-04-09 22:52:19 +02:00
XMLNS podcast: https://github.com/Podcastindex-org/podcast-namespace/blob/main/docs/1.0.md
2007-04-10 05:06:51 +02:00
-->
<xsl:stylesheet version= "1.0"
2021-04-10 02:09:13 +02:00
xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
2007-04-10 05:06:51 +02:00
xmlns:date="http://exslt.org/dates-and-times"
2021-04-10 02:09:13 +02:00
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:atom="http://www.w3.org/2005/Atom"
2021-04-09 22:52:19 +02:00
xmlns:podcast="https://podcastindex.org/namespace/1.0"
2007-04-10 05:06:51 +02:00
exclude-result-prefixes="xsl date">
<xsl:output method= "xml"
version="1.0"
encoding="utf-8"
indent="yes"/>
2007-10-27 16:16:39 +02:00
<xsl:include href= "common.xsl" />
2007-04-10 05:06:51 +02:00
2021-04-10 02:09:13 +02:00
<xsl:variable name= "baseurl" > http://www.c3d2.de/</xsl:variable>
2009-10-25 13:45:19 +01:00
<xsl:param name= "selection" select= "''" />
2012-10-15 23:18:24 +02:00
<xsl:param name= "format" />
2013-04-01 19:53:22 +02:00
<xsl:param name= "archivefeed" />
2007-04-10 05:06:51 +02:00
2021-04-09 22:52:19 +02:00
<!-- xsl:text disable - output - escaping="yes"><?xml - stylesheet type="text/css" href="https://c3d2.de/style/rss.css"?></xsl:text -->
2007-04-10 05:06:51 +02:00
<xsl:template match= "news" >
<rss version= "2.0" >
<channel >
2009-10-25 13:45:19 +01:00
<xsl:choose >
2012-05-07 03:06:40 +02:00
<xsl:when test= "$selection = 'pentamedia'" >
<title > Penta*</title>
<link > <xsl:value-of select= "$baseurl" /> </link>
<description > Pentaradio, Pentacast, Pentamusic</description>
2021-04-10 02:09:13 +02:00
<language > de</language>
<copyright > https://creativecommons.org/licenses/by-sa/2.0/de/</copyright>
2012-05-07 03:06:40 +02:00
<image >
<title > Pentaradio</title>
2017-03-05 21:28:46 +01:00
<url > <xsl:value-of select= "$baseurl" /> images/pentaradio-artwork.png</url>
2012-05-07 03:06:40 +02:00
<link > <xsl:value-of select= "$baseurl" /> radio.html</link>
</image>
2021-04-09 22:52:19 +02:00
2012-05-07 03:06:40 +02:00
<itunes:subtitle > Die drei Podcasts vom CCC Dresden</itunes:subtitle>
<itunes:summary >
Enthält Podcasts von Pentaradio, Pentacast und Pentamusic
</itunes:summary>
2017-03-05 21:28:46 +01:00
<itunes:image href= "{$baseurl}images/pentaradio-artwork.png" />
2012-05-07 03:06:40 +02:00
<itunes:category text= "Society & Culture" />
<itunes:category text= "Technology" >
<itunes:category text= "Tech News" />
</itunes:category>
</xsl:when>
<xsl:when test= "$selection = 'pentaradio'" >
2009-10-25 13:45:19 +01:00
<title > Pentaradio</title>
<link > <xsl:value-of select= "$baseurl" /> radio.html</link>
<description > C3D2 Pentaradio</description>
2021-04-10 02:09:13 +02:00
<language > de</language>
<copyright > http://creativecommons.org/licenses/by-sa/2.0/de/</copyright>
2012-04-18 22:40:24 +02:00
<image >
<title > Pentaradio</title>
2017-03-05 21:28:46 +01:00
<url > <xsl:value-of select= "$baseurl" /> images/pentaradio-artwork.png</url>
2012-04-18 22:40:24 +02:00
<link > <xsl:value-of select= "$baseurl" /> radio.html</link>
</image>
2009-10-25 13:45:19 +01:00
<itunes:subtitle > Radio vom CCC Dresden</itunes:subtitle>
<itunes:summary >
Pentaradio sind die Sendungen des Chaos Computer Club Dresden auf coloRadio, bestehend aus einem informativen Rahmenprogramm und Beiträgen zu einem sendungsspezifischen Thema.
</itunes:summary>
2017-03-05 21:28:46 +01:00
<itunes:image href= "{$baseurl}images/pentaradio-artwork.png" />
2011-07-13 23:27:12 +02:00
<itunes:category text= "Society & Culture" />
<itunes:category text= "Technology" >
<itunes:category text= "Tech News" />
2010-01-16 01:50:20 +01:00
</itunes:category>
2009-10-25 13:45:19 +01:00
</xsl:when>
2012-02-04 01:30:53 +01:00
<xsl:when test= "$selection = 'pentacast'" >
2009-10-25 13:45:19 +01:00
<title > Pentacast</title>
<link > <xsl:value-of select= "$baseurl" /> podcast.html</link>
<description > C3D2 Pentacast</description>
2021-04-10 02:09:13 +02:00
<language > de</language>
<copyright > http://creativecommons.org/licenses/by-sa/2.0/de/</copyright>
2012-04-18 22:40:24 +02:00
<image >
<title > Pentacast</title>
2017-03-05 21:28:46 +01:00
<url > <xsl:value-of select= "$baseurl" /> images/pentacast-artwork.png</url>
2012-04-18 22:40:24 +02:00
<link > <xsl:value-of select= "$baseurl" /> podcast.html</link>
</image>
2009-10-25 13:45:19 +01:00
<itunes:subtitle > Podcasts vom CCC Dresden</itunes:subtitle>
<itunes:summary >
Pentacast sind themenspezifische Sendungen des Chaos
Computer Club Dresden.
</itunes:summary>
2017-03-05 21:28:46 +01:00
<itunes:image href= "{$baseurl}images/pentacast-artwork.png" />
2011-07-13 23:27:12 +02:00
<itunes:category text= "Society & Culture" />
2010-01-16 01:50:20 +01:00
<itunes:category text= "Technology" />
</xsl:when>
2012-02-04 01:30:53 +01:00
<xsl:when test= "$selection = 'pentamusic'" >
2010-01-16 01:50:20 +01:00
<title > Pentamusic</title>
<link > <xsl:value-of select= "$baseurl" /> pentamusic.html</link>
<description > C3D2 Pentamusic</description>
2021-04-10 02:09:13 +02:00
<language > de</language>
<copyright > http://creativecommons.org/licenses/by-sa/2.0/de/</copyright>
2012-04-18 22:40:24 +02:00
<image >
<title > Pentamusic</title>
2013-01-08 15:51:07 +01:00
<url > <xsl:value-of select= "$baseurl" /> images/pentamusic-quadratic.png</url>
2012-04-18 22:40:24 +02:00
<link > <xsl:value-of select= "$baseurl" /> pentamusic.html</link>
</image>
2010-01-16 01:50:20 +01:00
<itunes:subtitle > Musikvorstellungen vom CCC Dresden</itunes:subtitle>
<itunes:summary >
Versuch, Künstler, Bands und Labels der CC-Szene vors
Mikro zu holen um diese einer breiteren Öffentlichkeit
bekannt zu machen.
</itunes:summary>
2013-01-08 15:51:07 +01:00
<itunes:image href= "{$baseurl}images/pentamusic-quadratic.png" />
2011-07-13 23:27:12 +02:00
<itunes:category text= "Society & Culture" />
2010-01-16 01:50:20 +01:00
<itunes:category text= "Music" />
2009-10-25 13:45:19 +01:00
</xsl:when>
<xsl:otherwise >
<title > C3D2 Podcast</title>
<link > <xsl:value-of select= "$baseurl" /> </link>
<description > C3D2 Podcast</description>
2021-04-10 02:09:13 +02:00
<language > de</language>
<copyright > http://creativecommons.org/licenses/by-sa/2.0/de/</copyright>
2012-04-18 22:40:24 +02:00
<image >
<title > C3D2</title>
<url > <xsl:value-of select= "$baseurl" /> images/ck.png</url>
<link > <xsl:value-of select= "$baseurl" /> </link>
</image>
2009-10-25 13:45:19 +01:00
<itunes:subtitle > Radio & Podcasts vom CCC Dresden</itunes:subtitle>
<itunes:summary >
2012-02-06 13:23:46 +01:00
Pentaradio, Pentacast & Pentamusic vom Chaos Computer Club Dresden.
2009-10-25 13:45:19 +01:00
</itunes:summary>
2012-04-18 22:40:24 +02:00
<itunes:image href= "{$baseurl}images/ck.png" />
2011-07-13 23:27:12 +02:00
<itunes:category text= "Society & Culture" />
2010-01-16 01:50:20 +01:00
<itunes:category text= "Technology" />
2009-10-25 13:45:19 +01:00
</xsl:otherwise>
</xsl:choose>
2007-04-19 14:32:58 +02:00
<itunes:author > Chaos Computer Club Dresden</itunes:author>
2010-01-27 13:39:47 +01:00
<itunes:owner >
<itunes:name > C3D2</itunes:name>
2017-03-05 21:34:17 +01:00
<itunes:email > podcast@c3d2.de</itunes:email>
2010-01-27 13:39:47 +01:00
</itunes:owner>
2017-03-05 21:34:17 +01:00
<itunes:explicit > no</itunes:explicit>
2021-04-09 22:52:19 +02:00
<!-- generator>C3D2 custom XSLT</generator -->
<!-- lastBuildDate>
<xsl:call-template name= "date-to-rfc822" >
<xsl:with-param name= "date" select= "$builddate" />
</xsl:call-template>
</lastBuildDate-->
<podcast:locked owner= "mail@c3d2.de" > no</podcast:locked>
<podcast:funding url= "https://c3d2.de/unterstuetzen.html" > C3D2 Unterstützen!</podcast:funding>
<podcast:funding url= "c3d2.de/membership.html" > Mitglied werden!</podcast:funding>
2021-04-09 22:53:59 +02:00
<podcast:location geo= "geo:51.08106,13.72867" > C3D2, Dresden, Germany</podcast:location>
2021-04-09 22:52:19 +02:00
<podcast:license url= "https://creativecommons.org/licenses/by-sa/2.0/de/" > CC BY-SA 2.0 DE</podcast:license>
<!-- experimental part -->
<podcast:value type= "bitcoin" method= "default" suggested= "0.00000001" >
2021-04-10 02:09:13 +02:00
<podcast:valueRecipient name= "C3D2" type= "bech32" address= "BC1QANU4755ULAU2JJDQSJLC3YW2XDJAWJ8WMVF5LA" fee= "true" />
<podcast:valueRecipient name= "C3D2" type= "p2sh" address= "3AhYpTzozbxFSmL1NqdZqsFgZhKc95BsCP" fee= "true" />
<podcast:valueRecipient name= "C3D2" type= "p2pkh" address= "195jSW9hXHdhu5QEeHkhyAN6Kf2oFUkmyK" fee= "true" />
<podcast:valueRecipient name= "C3D2" type= "bip47" address= "PM8TJRmTRWxcrfqwbA1t3KYk555WecaJ7CZJzPoK11R1nE8LuTHebppUysAnqNTX4kLrUyHm7oNPbsjAZrLjmfLdStiNG34iDMNcXqY27j9w7uaFcCah" fee= "true" />
2021-04-10 00:20:28 +02:00
<podcast:valueRecipient name= "C3D2" type= "paynym" address= "https://paynym.is/+lingeringmouse27c" fee= "true" />
2021-04-09 22:52:19 +02:00
</podcast:value>
<podcast:value type= "monero" method= "default" suggested= "0.000001" >
2021-04-10 00:20:28 +02:00
<podcast:valueRecipient name= "C3D2" type= "monero" address= "45c4E14LpNbeTdL8FSuBQA7M3wJ5nxGnYfnEzv3hwasfZUuKwP5zAaDCgJfD3s9kT4GP7y678gi6b1cGSVSgFpsTTm6fPtz" fee= "true" />
2021-04-09 22:52:19 +02:00
</podcast:value>
2021-04-10 00:20:28 +02:00
<podcast:value type= "wire" method= "sepa" suggested= "5" >
<podcast:valueRecipient name= "C3D2" type= "bezahlcode" address= "bank://singlepaymentsepa?name=NETZBIOTOP%20DRESDEN%20E.V.&reason=Spende&iban=DE34850900004655221005&bic=GENODEF1DRS&amount=" />
2021-04-09 22:52:19 +02:00
</podcast:value>
<!-- podcast:value type="lightning" method="keysend" suggested="0.00000005000">
<podcast:valueRecipient
name="[name of recipient(string)]"
type="[address type(string)]"
address="[the receiving address(string)]"
customKey="[optional key to pass(mixed)]"
customValue="[optional value to pass(mixed)]"
split="[share count(int)]"
fee=[true|false]
/>
</podcast:value-->
2013-04-01 19:53:22 +02:00
<xsl:if test= "$archivefeed" >
<atom:link rel= "prev-archive" href= "{$archivefeed}" />
</xsl:if>
2007-04-10 05:06:51 +02:00
<xsl:for-each select= "newsfile" >
<xsl:sort select= "date:seconds(document(.)/item/@date)" data-type= "number" order= "descending" />
2012-03-06 18:06:59 +01:00
<xsl:if test= "position() <= $maxitems" >
2011-11-14 02:15:26 +01:00
<xsl:choose >
<xsl:when test= "($selection = ' p e n t a r a d i o ' o r $ selection = 'pentamedia' ) a n d
starts-with(., 'content/news/pentaradio') and
count(document(.)/item//resource) > 0">
<xsl:apply-templates select= "document(.)/item//resource" mode= "preselect" >
<xsl:with-param name= "newsfile" select= "." />
</xsl:apply-templates>
</xsl:when>
<xsl:when test= "($selection = ' p e n t a c a s t ' o r $ selection = 'pentamedia' ) a n d
starts-with(., 'content/news/pentacast') and
count(document(.)/item//resource) > 0">
<xsl:apply-templates select= "document(.)/item//resource" mode= "preselect" >
<xsl:with-param name= "newsfile" select= "." />
</xsl:apply-templates>
</xsl:when>
<xsl:when test= "($selection = ' p e n t a m u s i c ' o r $ selection = 'pentamedia' ) a n d
starts-with(., 'content/news/pentamusic') and
count(document(.)/item//resource) > 0">
<xsl:apply-templates select= "document(.)/item//resource" mode= "preselect" >
<xsl:with-param name= "newsfile" select= "." />
</xsl:apply-templates>
</xsl:when>
<xsl:when test= "$selection = '' and count(document(.)/item//resource) > 0" >
<xsl:apply-templates select= "document(.)/item//resource" mode= "preselect" >
<xsl:with-param name= "newsfile" select= "." />
</xsl:apply-templates>
</xsl:when>
</xsl:choose>
</xsl:if>
2007-04-10 05:06:51 +02:00
</xsl:for-each>
</channel>
</rss>
</xsl:template>
2012-10-15 23:18:24 +02:00
2007-04-17 15:37:14 +02:00
<!-- Preselect heißt:
2012-10-15 23:18:24 +02:00
* Gucken, ob es in der Resource nicht ein Alternative gibt, welches $format ist
2007-04-17 15:37:14 +02:00
* Dann dieses nehmen
* Ansonsten die Resource nehmen
-->
<xsl:template match= "resource" mode= "preselect" >
<xsl:param name= "newsfile" />
<xsl:choose >
2012-10-15 23:18:24 +02:00
<!-- Gibts ein $format? -->
2012-11-29 22:35:29 +01:00
<xsl:when test= "count(alternative[contains($format, @type)]) > 0" >
<xsl:apply-templates select= "alternative[contains($format, @type)]" >
2007-04-17 15:37:14 +02:00
<xsl:with-param name= "newsfile" select= "$newsfile" />
</xsl:apply-templates>
</xsl:when>
2012-10-15 23:18:24 +02:00
<!-- Nimm was da ist -->
2007-04-17 15:37:14 +02:00
<xsl:otherwise >
<xsl:apply-templates select= "." >
<xsl:with-param name= "newsfile" select= "$newsfile" />
</xsl:apply-templates>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
2012-10-15 23:18:24 +02:00
2011-11-14 02:45:05 +01:00
<xsl:template match= "*[name() = 'resource' or name() = 'alternative']" >
2007-04-17 15:37:14 +02:00
<xsl:param name= "newsfile" />
2007-10-27 16:16:39 +02:00
<xsl:variable name= "href" >
<xsl:call-template name= "make-href" >
<xsl:with-param name= "href" select= "@url" />
</xsl:call-template>
</xsl:variable>
2007-04-17 15:37:14 +02:00
<xsl:call-template name= "generate-item" >
<xsl:with-param name= "newsfile" select= "$newsfile" />
2011-11-14 02:45:05 +01:00
<xsl:with-param name= "item_title" >
<xsl:value-of select= "document($newsfile)/item/@title" />
<xsl:if test= "count(document($newsfile)//resource) > 1 and @title" >
<!-- Multiple resources in this item? -->
<xsl:text > : </xsl:text>
<xsl:value-of select= "@title" />
</xsl:if>
</xsl:with-param>
<xsl:with-param name= "resource_title" >
<xsl:choose >
<xsl:when test= "@title" > <xsl:value-of select= "@title" /> </xsl:when>
<xsl:otherwise > <xsl:value-of select= "../@title" /> </xsl:otherwise>
</xsl:choose>
</xsl:with-param>
2011-11-14 02:38:26 +01:00
<xsl:with-param name= "date" select= "document($newsfile)/item/@date" />
2007-10-27 16:16:39 +02:00
<xsl:with-param name= "resource_url" select= "$href" />
2007-04-17 15:37:14 +02:00
<xsl:with-param name= "resource_size" select= "@size" />
<xsl:with-param name= "resource_type" select= "@type" />
2012-06-27 02:20:02 +02:00
<xsl:with-param name= "chapters" select= "sc:chapters"
2021-04-10 02:09:13 +02:00
xmlns:sc="http://podlove.de/simple-chapters"/>
2007-04-17 15:37:14 +02:00
</xsl:call-template>
</xsl:template>
<xsl:template name= "generate-item" >
2007-04-10 05:06:51 +02:00
<xsl:param name= "newsfile" />
2007-04-17 15:37:14 +02:00
<xsl:param name= "item_title" />
<xsl:param name= "resource_title" />
<xsl:param name= "date" />
<xsl:param name= "resource_url" />
<xsl:param name= "resource_size" />
<xsl:param name= "resource_type" />
2012-06-27 02:20:02 +02:00
<xsl:param name= "chapters" />
2007-04-17 15:37:14 +02:00
2007-04-10 05:06:51 +02:00
<item >
<xsl:variable name= "href" >
<xsl:value-of select= "$baseurl" />
<xsl:value-of select= "substring-before(substring-after($newsfile, 'content/'), '.xml')" />
<xsl:text > .html</xsl:text>
</xsl:variable>
2007-12-02 18:31:41 +01:00
<title > <xsl:value-of select= "$item_title" /> </title>
2011-11-14 02:38:26 +01:00
<description >
<xsl:text disable-output-escaping= "yes" > < ![CDATA[</xsl:text>
2021-04-10 02:09:13 +02:00
<div xmlns= "http://www.w3.org/1999/xhtml" >
2011-11-14 02:38:26 +01:00
<xsl:apply-templates select= "document($newsfile)/item/*[name() != 'resource']" />
</div>
<xsl:text disable-output-escaping= "yes" > ]]> </xsl:text>
</description>
2007-04-10 05:06:51 +02:00
<link > <xsl:value-of select= "$href" /> </link>
2007-04-17 15:37:14 +02:00
<enclosure
2007-04-18 01:11:20 +02:00
url="{$resource_url}"
2007-04-17 15:37:14 +02:00
length="{$resource_size}"
type="{$resource_type}"
/>
2007-04-19 14:32:58 +02:00
<guid isPermaLink= "false" > <xsl:value-of select= "concat($href, '+++', $resource_url)" /> </guid>
2007-04-10 05:06:51 +02:00
<pubDate >
<xsl:call-template name= "date-to-rfc822" >
2007-04-17 15:37:14 +02:00
<xsl:with-param name= "date" select= "$date" />
2007-04-10 05:06:51 +02:00
</xsl:call-template>
</pubDate>
2011-07-12 02:08:24 +02:00
<content:encoded >
<xsl:text disable-output-escaping= "yes" > < ![CDATA[</xsl:text>
2021-04-10 02:09:13 +02:00
<div xmlns= "http://www.w3.org/1999/xhtml" >
2011-07-12 02:25:43 +02:00
<xsl:apply-templates select= "document($newsfile)/item/*[name() != 'resource']" />
2011-07-12 02:08:24 +02:00
</div>
<xsl:text disable-output-escaping= "yes" > ]]> </xsl:text>
</content:encoded>
2007-04-17 15:37:14 +02:00
<!-- iTunes - Extensions zum Schluss, sonst validiert es nicht -->
2007-04-10 05:06:51 +02:00
2007-12-02 18:31:41 +01:00
<itunes:subtitle > <xsl:value-of select= "$resource_title" /> </itunes:subtitle>
<itunes:author > CCC Dresden</itunes:author>
2007-04-10 05:06:51 +02:00
2012-06-27 02:20:02 +02:00
<xsl:copy-of select= "$chapters" />
2021-04-09 22:52:19 +02:00
<!-- XMLNS podcast – https://podcastindex.org/ -->
<!-- podcast:transcript url="concat('',$baseurl,'transcripts/',$resource_url,'.html')" type="text/html"/ --> <!-- better check for variable and include when not empty -->
<!-- podcast:season name="Egyptology: The 19th Century">1</podcast:season -->
<!-- podcast:episode display="Ch.3">204</podcast:episode -->
<!-- podcast:chapters url="https://example.com/episode1/chapters.json" type="application/json+chapters" / -->
<!-- podcast:soundbite startTime="73.0" duration="60.0">Song</podcast:soundbite -->
2021-04-10 02:09:13 +02:00
<!-- podcast:person href="https://example.com/johnsmith/blog" img="http://example.com/images/johnsmith.jpg">John Smith</podcast:person -->
2021-04-09 22:52:19 +02:00
<!-- podcast:value -->
2007-04-17 15:37:14 +02:00
</item>
2007-04-10 05:06:51 +02:00
</xsl:template>
2011-11-14 02:06:42 +01:00
<xsl:template match= "addendum" >
<xsl:apply-templates select= "*[name() != 'resource']" />
</xsl:template>
2007-04-10 05:06:51 +02:00
</xsl:stylesheet>