support nocache files to disable caching
[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="NoCache">
20         <p>Caching disabled by <tt>NoCache</tt></p>
21        </xsl:if>
22
23        <xsl:if test="Item[ItemType='Message']">
24         <h2>Messages</h2>
25         <xsl:for-each select="Item[ItemType='Message']">
26          <p>
27           <xsl:value-of select="Message"/>
28          </p>
29         </xsl:for-each>
30        </xsl:if>
31
32        <pre style="border: 1px solid black">
33
34         <xsl:for-each select="Item">
35          <xsl:if test="ItemType='Display'">
36           <xsl:text>[d] </xsl:text>
37           <xsl:value-of select="Display"/><xsl:text>
38 </xsl:text>
39          </xsl:if>
40
41          <xsl:if test="ItemType='Dir'">
42           <xsl:text>[D] </xsl:text>
43           <a>
44            <xsl:attribute name="href">
45             <xsl:value-of select="UrlDir"/>
46            </xsl:attribute>
47            <xsl:value-of select="Title"/>
48           </a>
49           <xsl:text>
50 </xsl:text>
51          </xsl:if>
52
53          <xsl:if test="ItemType='ShowOnDemand'">
54           <xsl:text>[S] </xsl:text>
55            <a>
56             <xsl:attribute name="href">
57              <xsl:value-of select="ShowOnDemandURL"/>
58             </xsl:attribute>
59             <xsl:value-of select="ShowOnDemandName"/>
60            </a>
61            <xsl:text>
62 </xsl:text>
63          </xsl:if>
64
65          <xsl:if test="ItemType='ShowEpisode'">
66           <xsl:text>[E] </xsl:text>
67           <a>
68            <xsl:attribute name="href">
69             <xsl:value-of select="ShowEpisodeURL"/>
70            </xsl:attribute>
71            <xsl:value-of select="ShowEpisodeName"/>
72           </a>
73            <xsl:text>
74 </xsl:text>
75          </xsl:if>
76
77         </xsl:for-each>
78        </pre>
79
80        <xsl:if test="Item[ItemType='ShowEpisode']">
81         <h2>Show episodes</h2>
82         <xsl:for-each select="Item[ItemType='ShowEpisode']">
83          <h3>
84           <a>
85            <xsl:attribute name="href">
86             <xsl:value-of select="ShowEpisodeURL"/>
87            </xsl:attribute>
88            <xsl:value-of select="ShowEpisodeName"/>
89           </a>
90          </h3>
91          <p>
92           <xsl:value-of select="ShowDesc"/>
93           (<xsl:value-of select="ShowMime"/>)
94          </p>
95         </xsl:for-each>
96        </xsl:if>
97
98        <xsl:if test="Item[ItemType='Station']">
99         <h2>Internet radio stations</h2>
100         <xsl:for-each select="Item[ItemType='Station']">
101          <h3>
102           #<xsl:value-of select="StationId"/>:
103           <a>
104            <xsl:attribute name="href">
105             <xsl:value-of select="StationUrl"/>
106            </xsl:attribute>
107            <xsl:value-of select="StationName"/>
108           </a>
109          </h3>
110          <p>
111           <xsl:value-of select="StationDesc"/>
112           (<xsl:value-of select="ShowMime"/>)
113          </p>
114         </xsl:for-each>
115        </xsl:if>
116
117       </body>
118     </html>
119   </xsl:template>
120 </xsl:stylesheet>