3 <xsl:stylesheet version="1.0"
4 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
6 <xsl:output method="html" />
8 <xsl:template match="cscpage">
10 <xsl:text disable-output-escaping="yes"><![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">]]>
14 <title><xsl:value-of select="@title"/></title>
15 <style type="text/css">
16 <![CDATA[<!-- @import url('/default.css'); -->]]>
20 <xsl:apply-templates select="biglogo"/>
21 <xsl:apply-templates select="header">
22 <xsl:with-param name="title" select="@title"/>
23 </xsl:apply-templates>
24 <xsl:apply-templates select="section|menu"/>
25 <xsl:apply-templates select="footer"/>
30 <xsl:template match="section">
31 <h2><xsl:value-of select="@title"/></h2>
32 <xsl:apply-templates />
35 <xsl:template match="biglogo" name="menu">
36 <table cellspacing="0" cellpadding="2" border="0" align="center">
38 <td width="174" rowspan="2"><img src="/logos/csc_160_70.png" alt="CSC" width="165" height="75" /></td>
39 <td>University of Waterloo</td>
42 <td>Computer Science Club</td>
47 <xsl:template match="menuitem">
49 <a href="{@href}"><img border="0" src="/buttons/{@icon}.png"
50 width="40" height="40" alt="" /></a><br />
51 <a href="{@href}"><xsl:value-of select="@title"/></a>
55 <xsl:template match="menudefs">
56 <table cellspacing="1" cellpadding="3" border="0" bgcolor="black" align="center">
58 <xsl:apply-templates select="menuitem"/>
63 <xsl:template match="menu" name="menu">
64 <xsl:apply-templates select="document('menu.xml')/menudefs"/>
67 <xsl:template match="header" name="header">
68 <table cellspacing="0" cellpadding="2" border="0" width="100%"
71 <td width="84"><a href="/"><img src="/logos/csc_80_35.png"
72 alt="CSC" width="80" height="35" border="0" /></a></td>
73 <td class="pagetitle"><xsl:value-of select="$title"/></td>
78 select="document(concat($pwd,'/directory.xml'))/directory"/>
84 <xsl:template match="directory">
85 [<a href="index.html"><xsl:value-of select="@title"/></a>]
86 <xsl:apply-templates match="diritem"/>
89 <xsl:template match="diritem">
90 [<a href="{@href}"><xsl:value-of select="@title"/></a>]
93 <xsl:template match="footer" name="footer">
95 <xsl:call-template name="menu"/>
97 This page was generated on <xsl:value-of select="$date"/> at
98 <xsl:value-of select="$time"/>.
101 Copyright 2002 the Computer Science Club of the University of
102 Waterloo. Please direct website comments to the <a
103 href="mailto:www@csclub.uwaterloo.ca">Webmaster</a>.
107 <xsl:template match="newsdefs">
108 <xsl:apply-templates select="newsitem"/>
111 <xsl:template match="newsitem">
113 <td class="newsdate"><xsl:value-of select="@date"/></td>
114 <td rowspan="2" valign="top" class="newsitem"><xsl:apply-templates/></td>
117 <td class="newsauthor"><xsl:value-of select="@author"/></td>
121 <xsl:template match="news" name="news">
123 <th colspan="2" class="news">
127 <xsl:apply-templates select="document('news.xml')/newsdefs"/>
129 <td class="newsitem" colspan="2">
130 <a href="news/">Older news items</a> are available. Make sure you
131 check out the <a href="nntp://uw.csc">uw.csc</a> newsgroup and our
132 announcement boards on the second and third floor of MC for more
138 <xsl:template match="events" name="events">
140 <th colspan="2" class="news">
144 <xsl:for-each select="document('events.xml')/eventdefs/eventitem">
145 <xsl:sort select="translate(@date, '-', '')"
148 <xsl:if test="translate(@date, '-', '') >= translate($date, '-', '')">
150 <td class="eventdate"><xsl:value-of select="@date"/></td>
151 <td rowspan="2" valign="top" class="eventitem">
152 <a href="{translate(concat('/events/', @room, '-', @date, '-', @time, '.html'), ' ', '_')}">
153 <xsl:value-of select="@title"/>
155 <xsl:value-of select="short"/>
159 <td class="eventroom"><xsl:value-of select="@time"/>,
160 <xsl:value-of select="@room"/></td>
165 <td class="eventitem" colspan="2"><a href="events/">Past
166 events</a> are available.</td>
170 <xsl:template match="eventdefs">
171 <xsl:apply-templates/>
174 <xsl:template match="eventitem">
175 <xsl:document method="html"
176 href="{translate(concat($root, '/events/', @room, '-', @date, '-', @time, '.html'), ' ', '_')}">
177 <xsl:text disable-output-escaping="yes"><![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">]]>
181 <title><xsl:value-of select="@title"/></title>
182 <style type="text/css">
183 <![CDATA[<!-- @import url('/default.css'); -->]]>
187 <xsl:call-template name="header">
188 <xsl:with-param name="title" select="@title"/>
191 Held in <xsl:value-of select="@room"/> at
192 <xsl:value-of select="@date"/>, <xsl:value-of select="@time"/>.
195 <xsl:apply-templates select="abstract"/>
196 <xsl:call-template name="footer"/>
202 <xsl:template match="news-and-events">
203 <table cellspacing="1" cellpadding="2" bgcolor="black">
204 <xsl:call-template name="news"/>
205 <xsl:call-template name="events"/>
209 <xsl:template match="events-this-term">
210 <p>The events for <xsl:value-of select="$term"/> are listed here.</p>
211 <xsl:for-each select="document('events.xml')/eventdefs/eventitem">
212 <xsl:sort select="translate(@date, '-', '')"
215 <xsl:if test="@term = $term">
216 <h3><xsl:value-of select="@title"/></h3>
218 <b><xsl:value-of select="@room"/>,
219 <xsl:value-of select="@date"/>, <xsl:value-of
220 select="@time"/>: </b>
221 <xsl:value-of select="short"/>
222 <a href="{translate(concat('/events/', @room, '-', @date, '-', @time, '.html'), ' ', '_')}">
223 More information</a>.
229 <xsl:template match="generate-event-files">
230 <xsl:apply-templates select="document('events.xml')/eventdefs"/>
233 <xsl:template match="old-events">
234 <xsl:for-each select="document('events.xml')/eventdefs/eventitem">
235 <xsl:sort select="term"
242 <xsl:template match="execlist">
243 <h3>Elected positions</h3>
245 <xsl:apply-templates select="exec[@type='elected']"/>
247 <h3>Appointed positions</h3>
249 <xsl:apply-templates select="exec[@type='appointed']"/>
253 <xsl:template match="exec">
254 <li><xsl:value-of select="@name"/> is this term's <b><xsl:value-of
255 select="@position"/></b>. You can <a
256 href="mailto:{@userid}@csclub.uwaterloo.ca">e-mail them</a><xsl:if
257 test="not(@href='')"> or <a href="{@href}">visit their
258 homepage</a></xsl:if>.
262 <xsl:template match="*">
264 <xsl:copy-of select="@*" />
265 <xsl:apply-templates />