Use advanced transcoding that streams while transcoding
[noxon-gateway.git] / www / html.xsl
1 <?xml version="1.0" encoding="utf-8"?>
2 <xsl:stylesheet version="1.0"
3   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4   xmlns="http://www.w3.org/1999/xhtml">
5   <xsl:template match="ListOfItems">
6     <html>
7       <body>
8        <xsl:for-each select="Item[ItemType='Previous']">
9         <pre>
10          <a>
11           <xsl:attribute name="href">
12            <xsl:value-of select="UrlPrevious"/>
13           </xsl:attribute>
14           <xsl:text>&lt; back</xsl:text>
15          </a>
16         </pre>
17        </xsl:for-each>
18
19        <xsl:if test="Item[ItemType='Message']">
20         <h2>Messages</h2>
21         <xsl:for-each select="Item[ItemType='Message']">
22          <p>
23           <xsl:value-of select="Message"/>
24          </p>
25         </xsl:for-each>
26        </xsl:if>
27
28        <pre style="border: 1px solid black">
29
30         <xsl:for-each select="Item">
31          <xsl:if test="ItemType='Display'">
32           <xsl:text>[d] </xsl:text>
33           <xsl:value-of select="Display"/><xsl:text>
34 </xsl:text>
35          </xsl:if>
36
37          <xsl:if test="ItemType='Dir'">
38           <xsl:text>[D] </xsl:text>
39           <a>
40            <xsl:attribute name="href">
41             <xsl:value-of select="UrlDir"/>
42            </xsl:attribute>
43            <xsl:value-of select="Title"/>
44           </a>
45           <xsl:text>
46 </xsl:text>
47          </xsl:if>
48
49          <xsl:if test="ItemType='ShowOnDemand'">
50           <xsl:text>[S] </xsl:text>
51            <a>
52             <xsl:attribute name="href">
53              <xsl:value-of select="ShowOnDemandURL"/>
54             </xsl:attribute>
55             <xsl:value-of select="ShowOnDemandName"/>
56            </a>
57            <xsl:text>
58 </xsl:text>
59          </xsl:if>
60
61          <xsl:if test="ItemType='ShowEpisode'">
62           <xsl:text>[E] </xsl:text>
63           <a>
64            <xsl:attribute name="href">
65             <xsl:value-of select="ShowEpisodeURL"/>
66            </xsl:attribute>
67            <xsl:value-of select="ShowEpisodeName"/>
68           </a>
69            <xsl:text>
70 </xsl:text>
71          </xsl:if>
72
73         </xsl:for-each>
74        </pre>
75
76        <xsl:if test="Item[ItemType='ShowEpisode']">
77         <h2>Show episodes</h2>
78         <xsl:for-each select="Item[ItemType='ShowEpisode']">
79          <h3>
80           <a>
81            <xsl:attribute name="href">
82             <xsl:value-of select="ShowEpisodeURL"/>
83            </xsl:attribute>
84            <xsl:value-of select="ShowEpisodeName"/>
85           </a>
86          </h3>
87          <p>
88           <xsl:value-of select="ShowDesc"/>
89           (<xsl:value-of select="ShowMime"/>)
90          </p>
91         </xsl:for-each>
92        </xsl:if>
93
94        <xsl:if test="Item[ItemType='Station']">
95         <h2>Internet radio stations</h2>
96         <xsl:for-each select="Item[ItemType='Station']">
97          <h3>
98           #<xsl:value-of select="StationId"/>:
99           <a>
100            <xsl:attribute name="href">
101             <xsl:value-of select="StationUrl"/>
102            </xsl:attribute>
103            <xsl:value-of select="StationName"/>
104           </a>
105          </h3>
106          <p>
107           <xsl:value-of select="StationDesc"/>
108           (<xsl:value-of select="ShowMime"/>)
109          </p>
110         </xsl:for-each>
111        </xsl:if>
112
113       </body>
114     </html>
115   </xsl:template>
116 </xsl:stylesheet>