Fixed event bugs and removed dead xsl code.
[mspang/www.git] / xsl / common.xsl
1 <?xml version='1.0'?>
2
3 <xsl:stylesheet version="2.0"
4     xmlns="http://www.w3.org/1999/xhtml"
5     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
6     xmlns:xs="http://www.w3.org/2001/XMLSchema"
7     xmlns:csc="http://www.csclub.uwaterloo.ca/xslt">
8
9 <xsl:template match="cscpage">
10   <html>
11     <head>
12       <title><xsl:value-of select="@title" /></title>
13       <link rel="stylesheet" href="{$pre}default.css" type="text/css" />
14     </head>
15     <body><div>
16       <a id="pagetop" />
17       <xsl:apply-templates select="biglogo" />
18       <xsl:apply-templates select="header" />
19       <xsl:apply-templates select="section|menu" />
20       <xsl:apply-templates select="footer" />
21     </div></body>
22   </html>
23 </xsl:template>
24
25 <xsl:template match="section">
26   <h2><xsl:value-of select="@title" /></h2>
27   <xsl:apply-templates />
28 </xsl:template>
29
30 <xsl:template match="biglogo">
31   <div class="biglogo">
32     <div class="uwlogo">
33       <a href="http://www.uwaterloo.ca/"><img src="{$pre}logos/uw_logo.gif"
34           alt="University of Waterloo" width="105" height="70" /></a>
35     </div>
36     <div class="acmlogo">
37       <a href="http://www.acm.org"><img src="{$pre}logos/acm_logo.gif"
38            alt="A Student Chapter of the ACM" width="82" height="88" /></a>
39     </div>
40   </div>
41 </xsl:template>
42
43 <xsl:template match="header" name="header">
44   <div id="vfeed" />
45   <div class="webtitle">
46     <div class="csclogo">
47       <a href="{$pre}"><img src="{$pre}logos/csc_80_35_white.png" 
48           alt="CSC Logo" /></a>
49     </div>
50     <div>
51       <a href="{$pre}"><img src="{$pre}logos/csc_title.png" 
52           alt="Computer Science Club" /></a>
53     </div>
54   </div>
55   <div class="template-header">
56     <xsl:apply-templates
57         select="document(concat($g_pwd, '/directory.xml'))/directory"/>
58   </div>
59 </xsl:template>
60
61 <xsl:template match="footer" name="footer">
62   <a href="#pagetop" class="pagetop">Go to top</a>
63   <div class="footer">
64   <xsl:call-template name="menu" />
65   <p>This page was generated on <xsl:value-of select="$g_date" /> at 
66     <xsl:value-of select="$g_time" />.</p>
67   <p class="infobox">
68     The overall layout is designed specially for modern browsers. If you
69     experience any problems, please report them, along with the version of
70     your browser and operating system, to the 
71     <a href="mailto:www@csclub.uwaterloo.ca">Webmaster</a>.
72   </p>
73   <p>
74     <a href="http://validator.w3.org/check?uri=referer">
75     <img src="http://www.w3.org/Icons/valid-xhtml10"
76         alt="Valid XHTML 1.0 Strict" height="31" width="88" />
77     </a>
78     <a href="http://jigsaw.w3.org/css-validator/check/referer">
79       <img style="border:0;width:88px;height:31px"
80           src="http://jigsaw.w3.org/css-validator/images/vcss" 
81           alt="Valid CSS!" />
82     </a>
83   </p>
84   <div class="footerlogo"><a href="{$pre}"><img src=
85       "{$pre}logos/csc_80_35.png" alt="CSC" /></a></div>
86     <p>
87       Copyright
88       <xsl:text disable-output-escaping="yes">&amp;copy;</xsl:text>
89       2002<xsl:text disable-output-escaping="yes">&amp;ndash;</xsl:text>2007
90       Computer Science Club of the University of Waterloo.<br />
91       KDE Crystal theme icons are copyright
92       <xsl:text disable-output-escaping="yes">&amp;copy;</xsl:text>
93       2002 and following years KDE Artists. Sunflower image is copyright Manan 
94       Tuli. Horde image is copyright horde contributors. Both are available 
95       under the <a href="http://creativecommons.org/licenses/by-sa/2.5/">
96       Creative Commons::Attribution-ShareAlike license</a>. Gopher image is 
97       copyright Elron6900 (Flickr) and is available under the <a
98       href="http://creativecommons.org/licenses/by-nc/2.0/">
99       Attribution-NonCommercial 2.0</a> license.
100     </p>
101   </div>
102 </xsl:template>
103
104 <xsl:template match="news-and-events">
105   <table cellspacing="1" cellpadding="2" class="newsandevents">
106     <xsl:call-template name="events" />
107     <xsl:call-template name="news" />
108  </table>
109 </xsl:template>
110
111 </xsl:stylesheet>