forked from linnoss/MediaApps2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rs.xsl
45 lines (41 loc) · 1.65 KB
/
rs.xsl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?xml version="1.0" encoding="utf-8" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xhtml="http://www.w3.org/1999/xhtml" exclude-result-prefixes="xhtml" version="1.0">
<xsl:output method="xml" indent="yes"/>
<!-- ROOT -->
<xsl:template match="/plugin">
<plugin>
<name>The Royal Society</name>
<enabled>false</enabled>
<period>10080</period>
<description>Podcasts and lectures published by The Royal Society</description>
<link>http://royalsociety.org/</link>
<artwork>http://downloads.royalsociety.org/Images/Furniture/Blogs/royalsociety-logo.png</artwork>
<container type="html">/home</container>
</plugin>
</xsl:template>
<!-- HOME -->
<xsl:template match="/container[text() = '/home']">
<container name="The Royal Society">
<xsl:for-each select="document('http://downloads.royalsociety.org/rss/audio.xml')/rss/channel/item">
<item>
<metadatum tag="type">audio</metadatum>
<metadatum tag="a.type">podcast</metadatum>
<metadatum tag="a.title">
<xsl:value-of select="title"/>
</metadatum>
<metadatum tag="a.description">
<xsl:value-of select="description"/>
</metadatum>
<metadatum tag="a.uri">
<xsl:value-of select="enclosure/@url" />
</metadatum>
<metadatum tag="a.duration">
<xsl:value-of select="enclosure/@length"/>
</metadatum>
<metadatum tag="a.channels">2</metadatum>
<metadatum tag="a.codec">mp3</metadatum>
</item>
</xsl:for-each>
</container>
</xsl:template>
</xsl:stylesheet>