plugins/jlogcast: jlogcast2html.xsl

File jlogcast2html.xsl, 3.2 kB (added by robertb, 2 years ago)

schöne Formatierung der Dateigröße

Line 
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3         xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">
4
5 <!-- jlogcast2html - HTML-Darstellung eines Jlogcast-Feeds
6  *
7  * Copyright (C) 2007 Robert Bienert
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
22 -->
23
24 <!-- Wir verwenden die HTML-Ausgabe, weil der MSIE z.B. zwar XML-faehig
25      ist, aber mit XHTML nichts anfangen kann.
26 -->
27 <xsl:output method="html" encoding="UTF-8" indent="no"
28         media-type="text/html"
29         doctype-public="-//W3C//DTD HTML 4.01//EN"
30         doctype-system="http://www.w3.org/TR/html4/strict.dtd" />
31
32 <xsl:decimal-format name="de" decimal-separator="," grouping-separator="."/>
33
34 <xsl:template match="/rss/channel">
35 <html><xsl:attribute name="lang"><xsl:value-of select="language" /></xsl:attribute>
36 <head>
37         <title><xsl:value-of select="title" /></title>
38         <!-- globale Stylesheets -->
39         <link rel="stylesheet" href="../personal/css/screen.css" type="text/css" media="screen,projection" />
40         <link rel="stylesheet" href="../personal/css/print.css" type="text/css" media="print" />
41         <!-- spezielle Stylesheet fuer den transformierten Feed -->
42         <link rel="stylesheet" href="../xml/jlogcast.css" type="text/css" />
43         <link rel="stylesheet" href="../xml/jlogcast.screen.css" type="text/css" media="screen,projection" />
44         <!-- fuer die Statistik (optional) -->
45         <meta name="generator" content="jlogcast2html.xsl v0.2, 2007-03-12" />
46 </head>
47 <body>
48 <h1><xsl:value-of select="title" /></h1>
49 <h2><xsl:value-of select="description" /><br />
50 Herausgegeben von <xsl:value-of select="itunes:author" /></h2>
51
52 <dl id="main">
53 <xsl:for-each select="item">
54         <dt>
55                 <a><xsl:attribute name="href">
56                         <xsl:value-of select="link" /></xsl:attribute>
57                 <xsl:value-of select="title" />
58                 </a>
59         </dt>
60         <dd>
61         <p class="date">
62                 <xsl:value-of select="pubDate" />
63                 <xsl:text>: </xsl:text>
64                 <xsl:value-of select="itunes:summary" disable-output-escaping="yes" />
65         </p>
66         <p class="track">
67                 <a><xsl:attribute name="href">
68                         <xsl:value-of select="enclosure/@url" />
69                         </xsl:attribute>
70                 <xsl:attribute name="type">
71                         <xsl:value-of select="enclosure/@type" />
72                         </xsl:attribute>
73                 <xsl:value-of select="itunes:duration" />
74                         <xsl:text> Minuten, </xsl:text>
75                 <xsl:value-of select="format-number(enclosure/@length div 1048576, '#,0', 'de')" />
76                         <xsl:text> MB</xsl:text>
77                 </a>
78         </p>
79         </dd>
80 </xsl:for-each>
81
82 <dt id="info">Info</dt>
83 <dd><xsl:value-of select="copyright" />, letzte Änderung <xsl:value-of select="lastBuildDate" /></dd>
84 </dl>
85 </body>
86 </html>
87 </xsl:template>
88
89 </xsl:stylesheet>