Revert "specify style type to text/css resutling in it (presently) validating as...
[www/www.git] / xsl / common.xsl
1 <?xml version='1.0'?>
2
3 <xsl:stylesheet version="1.1"
4     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
5     xmlns:csc="http://csclub.uwaterloo.ca/xsltproc"
6     xmlns="http://www.w3.org/1999/xhtml"
7     exclude-result-prefixes="csc">
8 <xsl:output method="xml" />
9
10 <xsl:template match="cscpage">
11   <html>
12     <head>
13       <link rel="shortcut icon" href="/favicon.ico" />
14       <link rel="alternate" title="CSC Events Feed" href="{$g_pre}events.atom"
15           type="application/rss+xml" />
16       <link rel="alternate" title="CSC News Feed" href="{$g_pre}news.atom"
17           type="application/rss+xml" />
18       <title><xsl:value-of select="@title" /></title>
19       <link rel="stylesheet" href="{$g_pre}default.css" type="text/css" />
20       <xsl:if test="@morestyle">
21       <style>
22        <xsl:value-of select="@morestyle" />
23       </style>
24       </xsl:if>
25     </head>
26     <body><div class="content">
27       <a id="pagetop" />
28       <xsl:apply-templates select="biglogo" />
29       <xsl:apply-templates select="header" />
30       <xsl:apply-templates select="section|menu" />
31       <xsl:apply-templates select="footer" />
32     </div></body>
33   </html>
34 </xsl:template>
35
36 <xsl:template match="section">
37   <xsl:if test="@anchor">
38     <a id="{@anchor}" />
39   </xsl:if>
40     <h2><xsl:value-of select="@title" /></h2>
41   <xsl:apply-templates />
42 </xsl:template>
43
44 <xsl:template match="biglogo">
45   <div class="biglogo">
46     <div class="uwlogo">
47       <a href="http://www.uwaterloo.ca/"><img src="{$g_pre}logos/uw_logo.png"
48           alt="University of Waterloo" width="105" height="70" /></a>
49     </div>
50     <div class="csclogo">
51       <a href="{$g_pre}"><img src="{$g_pre}logos/csc_logo.png"
52           alt="Computer Science Club" width="420" height="79" /></a>
53     </div>
54   </div>
55   <div class="dirheader">
56     <xsl:apply-templates
57         select="document(concat($g_pwd, '/directory.xml'))/directory"/>
58   </div>
59 </xsl:template>
60
61 <xsl:template match="header">
62   <xsl:call-template name="header" />
63 </xsl:template>
64
65 <xsl:template name="header">
66   <xsl:param name="title" />
67   <xsl:param name="href" />
68   <div class="webtitle">
69     <a href="{$g_pre}"><img src="{$g_pre}logos/csc_title.png"
70         alt="CSC Logo" /></a>
71   </div>
72   <div class="dirheader">
73     <xsl:apply-templates
74         select="document(concat($g_pwd, '/directory.xml'))/directory"/>
75     <xsl:if test="$title">
76       <xsl:call-template name="diritem">
77         <xsl:with-param name="title" select="$title" />
78         <xsl:with-param name="href" select="$href" />
79       </xsl:call-template>
80     </xsl:if>
81   </div>
82 </xsl:template>
83
84 <xsl:template match="footer" name="footer">
85   <div class="footer">
86     <xsl:call-template name="menu" />
87     <a href="#pagetop" class="pagetop">Go to top</a>
88     <div class="infobox">
89       <p>
90         This site supports TLS/SSL using a certificate signed by the
91         "CSC Certificate Authority". Click <a href="{$g_pre}csclub.pem">
92         here</a> (PEM format) or <a href="{$g_pre}csclub.der">here</a> (DER
93         format) to install the certificate authority into your browser.
94       </p><p>
95         This page was generated on <xsl:value-of select="$g_date" /> at
96         <xsl:value-of select="$g_time" />.
97       </p><p>
98         Copyright
99         <xsl:text disable-output-escaping="yes">&amp;copy;</xsl:text>
100         2002<xsl:text disable-output-escaping="yes">&amp;ndash;</xsl:text>2007
101         Computer Science Club of the University of Waterloo.
102       </p>
103     </div>
104   </div>
105 </xsl:template>
106
107 <xsl:template match="news-and-events">
108   <table cellspacing="1" cellpadding="2" class="newsandevents">
109     <xsl:call-template name="events" />
110     <xsl:call-template name="news" />
111   </table>
112 </xsl:template>
113
114 </xsl:stylesheet>