3 <xsl:stylesheet version="1.0"
4 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
5 xmlns:csc="http://www.csclub.uwaterloo.ca/cow"
6 extension-element-prefixes="csc">
8 <xsl:output method="html" />
10 <xsl:template match="cscpage">
12 <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">]]>
16 <title><xsl:value-of select="@title"/></title>
17 <link rel="stylesheet" href="/default.css" type="text/css" />
18 <style type="text/css">
19 <![CDATA[<!-- @import url('/default.css'); -->]]>
22 <body bgcolor="#ffffff">
23 <xsl:apply-templates select="biglogo"/>
24 <xsl:apply-templates select="header">
25 <xsl:with-param name="title" select="@title"/>
26 </xsl:apply-templates>
27 <xsl:apply-templates select="section|menu"/>
28 <xsl:apply-templates select="footer"/>
33 <xsl:template match="section">
34 <h2><xsl:value-of select="@title"/></h2>
35 <xsl:apply-templates />
38 <xsl:template match="biglogo" name="biglogo">
39 <table cellspacing="0" cellpadding="0" border="0" align="center">
41 <td width="109"><a href="http://www.uwaterloo.ca/"><img
42 src="/logos/uw_logo_100_68.gif" alt="University of Waterloo"
43 width="100" height="68" align="center" border="0" /></a></td>
44 <td width="174"><a href="/"><img src="/logos/csc_160_70.png"
45 alt="Computer Science Club" width="165" height="75" align="center"
46 border="0" /></a></td>
47 <td width="91"><a href="http://www.acm.org"><img width="82"
48 height="103" src="/logos/acm_logo.gif" alt="A Student Chapter of
49 the ACM" align="center" border="0" /></a></td>
54 <xsl:template match="menuitem">
55 <td bgcolor="#eeeeee" class="button">
56 <a href="{@href}"><img border="0" src="/buttons/{@icon}.png"
57 width="40" height="40" alt="" /></a><br />
58 <a href="{@href}"><xsl:value-of select="@title"/></a>
62 <xsl:template match="menudefs">
63 <table cellspacing="1" cellpadding="3" border="0" bgcolor="black" align="center">
65 <xsl:apply-templates select="menuitem"/>
70 <xsl:template match="menu" name="menu">
71 <xsl:apply-templates select="document('menu.xml')/menudefs"/>
74 <xsl:template match="header" name="header">
75 <table cellspacing="0" cellpadding="2" border="0" width="100%"
78 <td width="84"><a href="/"><img src="/logos/csc_80_35.png"
79 alt="CSC" width="80" height="35" border="0" /></a></td>
80 <td class="pagetitle"><xsl:value-of select="$title"/></td>
85 select="document(concat($pwd,'/directory.xml'))/directory"/>
91 <xsl:template match="directory">
92 [<xsl:if test="@href = ''"><a href="index.html"><xsl:value-of
93 select="@title"/></a></xsl:if><xsl:if test="@href != ''">
94 <a href="{@href}"><xsl:value-of select="@title"/></a></xsl:if>]
95 <xsl:apply-templates match="diritem"/>
98 <xsl:template match="diritem">
99 [<a href="{@href}"><xsl:value-of select="@title"/></a>]
102 <xsl:template match="footer" name="footer">
104 <xsl:call-template name="menu"/>
106 This page was generated on <xsl:value-of select="$date"/> at
107 <xsl:value-of select="$time"/>.
110 We recently switched to our new website. The <a href="/old/">old
111 website (as of 2002-08-10)</a> is still available.
114 Copyright 2002 the Computer Science Club of the University of
115 Waterloo. Please direct website comments to the <a
116 href="mailto:www@csclub.uwaterloo.ca">Webmaster</a>.
120 <xsl:template match="newsdefs">
121 <xsl:apply-templates select="newsitem[csc:term(@date) = csc:term($date)]">
122 <xsl:sort select="translate(@date, '-', '')"
125 </xsl:apply-templates>
128 <xsl:template match="newsitem">
130 <td class="newsdate" bgcolor="#eeeeff"><xsl:value-of select="@date"/></td>
131 <td rowspan="2" valign="top" class="newsitem" bgcolor="white"><xsl:apply-templates/></td>
134 <td class="newsauthor" bgcolor="#eeeeff"><xsl:value-of select="@author"/></td>
138 <xsl:template match="news" name="news">
140 <th colspan="2" class="news" bgcolor="#aaaaff">
144 <xsl:apply-templates select="document('news.xml')/newsdefs"/>
146 <td class="newsitem" bgcolor="white" colspan="2">
147 <a href="news/">Older news items</a> are available. Make sure you
148 check out the <a href="nntp://uw.csc">uw.csc</a> newsgroup and our
149 announcement boards on the second and third floor of MC for more
155 <xsl:template match="events" name="events">
157 <th colspan="2" class="news" bgcolor="#aaaaff">
161 <xsl:for-each select="document('events.xml')/eventdefs/eventitem">
162 <xsl:sort select="translate(@date, '-', '')"
165 <xsl:if test="translate(@date, '-', '') >= translate($date, '-', '')">
167 <td class="eventdate" bgcolor="#eeffee"><xsl:value-of select="@date"/></td>
168 <td rowspan="2" valign="top" class="eventitem" bgcolor="white">
169 <a href="{translate(concat('/events/', @room, '-', @date, '-', @time, '.html'), ' ', '_')}">
170 <xsl:value-of select="@title"/>
172 <xsl:value-of select="short"/>
176 <td class="eventroom" bgcolor="#eeffee"><xsl:value-of select="@time"/>,
177 <xsl:value-of select="@room"/></td>
182 <td class="eventitem" bgcolor="white" colspan="2"><a href="events/">Past
183 events</a> are available.</td>
187 <xsl:template match="eventdefs">
188 <xsl:apply-templates/>
191 <xsl:template match="eventitem">
192 <xsl:document method="html"
193 href="{translate(concat($root, '/events/', @room, '-', @date, '-', @time, '.html'), ' ', '_')}">
194 <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">]]>
198 <title><xsl:value-of select="@title"/></title>
199 <style type="text/css">
200 <![CDATA[<!-- @import url('/default.css'); -->]]>
203 <body bgcolor="#ffffff">
204 <xsl:call-template name="header">
205 <xsl:with-param name="title" select="@title"/>
208 Held in <xsl:value-of select="@room"/> at
209 <xsl:value-of select="@date"/>, <xsl:value-of select="@time"/>.
212 <xsl:apply-templates select="abstract"/>
213 <xsl:call-template name="footer"/>
219 <xsl:template match="news-and-events">
220 <table cellspacing="1" cellpadding="2" bgcolor="black">
221 <xsl:call-template name="events"/>
222 <xsl:call-template name="news"/>
226 <xsl:template match="events-this-term" name="events-by-term">
227 <p>The events for <xsl:value-of select="csc:term($date)"/> are listed here.</p>
228 <xsl:for-each select="document('events.xml')/eventdefs/eventitem">
229 <xsl:sort select="translate(@date, '-', '')"
232 <xsl:if test="csc:term(@date) = csc:term($date)">
233 <h3><a href="{translate(concat('/events/', @room, '-', @date, '-', @time, '.html'), ' ', '_')}"><xsl:value-of select="@title"/></a></h3>
235 <b><xsl:value-of select="@room"/>,
236 <xsl:value-of select="@date"/>, <xsl:value-of
237 select="@time"/>: </b>
238 <xsl:value-of select="short"/>
239 <a href="{translate(concat('/events/', @room, '-', @date, '-', @time, '.html'), ' ', '_')}">
240 More information</a>.
246 <xsl:template match="news-this-term" name="news-by-term">
247 <p>The news for <xsl:value-of select="csc:term($date)"/> is listed here.</p>
248 <xsl:for-each select="document('news.xml')/newsdefs/newsitem">
249 <xsl:sort select="translate(@date, '-', '')"
252 <xsl:if test="csc:term(@date) = csc:term($date)">
254 <b><xsl:value-of select="@date"/>,
255 <xsl:value-of select="@author"/>: </b> <xsl:apply-templates/>
261 <xsl:template match="members-this-term">
262 <p>The members for <xsl:value-of select="csc:term($date)"/> are
263 listed here. We currently have <xsl:value-of
264 select="count(document('members.xml')/memberlist/member)"/> members.</p>
271 <xsl:for-each select="document('members.xml')/memberlist/member">
273 <xsl:if test="position() mod 2 = 0">
274 <xsl:attribute name="bgcolor">#cee6ff</xsl:attribute>
276 <td><xsl:value-of select="@id"/></td>
277 <td><xsl:value-of select="@name"/></td>
278 <td><xsl:value-of select="@program"/></td>
284 <xsl:template match="all-books">
285 <p>The books we currently own include:</p>
291 <xsl:for-each select="document('books.xml')/booklist/book">
293 <xsl:if test="position() mod 2 = 0">
294 <xsl:attribute name="bgcolor">#cee6ff</xsl:attribute>
296 <td><a href="/office/books/{translate(@isbn, ' ', '_')}.html"><xsl:value-of
297 select="@title"/><xsl:if test="@edition != ''"> (<xsl:value-of
298 select="@edition"/>)</xsl:if></a></td>
299 <td><xsl:value-of select="@author"/></td>
301 <xsl:document method="html" href="{translate(concat($root, '/office/books/', @isbn, '.html'), ' ', '_')}">
302 <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">]]>
306 <title>Book: <xsl:value-of select="@title"/></title>
307 <style type="text/css">
308 <![CDATA[<!-- @import url('/default.css'); -->]]>
311 <body bgcolor="#ffffff">
312 <xsl:call-template name="header">
313 <xsl:with-param name="title" select="@title"/>
314 <xsl:with-param name="pwd" select="concat($pwd, '/books')"/>
317 <b>Title: </b> <xsl:value-of select="@title"/><br />
318 <b>Edition: </b> <xsl:value-of select="@edition"/><br />
319 <b>ISBN: </b> <xsl:value-of select="@isbn"/><br />
320 <b>Author: </b> <xsl:value-of select="@author"/><br />
321 <b>Published: </b> <xsl:value-of select="@published"/><br />
323 <xsl:call-template name="footer"/>
331 <xsl:template match="generate-event-files">
332 <xsl:apply-templates select="document('events.xml')/eventdefs"/>
335 <xsl:key name="eventterm"
336 match="/eventdefs/eventitem"
337 use="csc:term(@date)" />
339 <xsl:template match="old-events">
341 select="document('events.xml')/eventdefs/eventitem">
343 <xsl:sort select="translate(@date, '-', '')"
348 test="not(preceding-sibling::*[csc:term(@date)=csc:term(current()/@date)]) and not(csc:term(@date) = csc:term($date))">
349 <p><a href="{translate(concat('old-',
350 csc:term(@date), '.html'), ' ', '_')}">
352 select="csc:term(@date)"/></a></p>
353 <xsl:document method="html" href="{translate(concat($root, '/events/old-', csc:term(@date), '.html'), ' ', '_')}">
354 <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">]]>
358 <title>Events for <xsl:value-of select="csc:term(@date)"/></title>
359 <style type="text/css">
360 <![CDATA[<!-- @import url('/default.css'); -->]]>
363 <body bgcolor="#ffffff">
364 <xsl:call-template name="header">
365 <xsl:with-param name="title" select="concat('Events for ', csc:term(@date))"/>
367 <xsl:call-template name="events-by-term">
368 <xsl:with-param name="date" select="@date"/>
370 <xsl:call-template name="footer"/>
378 <xsl:key name="newsterm"
379 match="/newsdefs/newsitem"
380 use="csc:term(@date)" />
382 <xsl:template match="old-news">
384 select="document('news.xml')/newsdefs/newsitem">
386 <xsl:sort select="translate(@date, '-', '')"
391 test="not(preceding-sibling::*[csc:term(@date)=csc:term(current()/@date)]) and not(csc:term(@date) = csc:term($date))">
392 <p><a href="{translate(concat('old-',
393 csc:term(@date), '.html'), ' ', '_')}">
395 select="csc:term(@date)"/></a></p>
396 <xsl:document method="html" href="{translate(concat($root, '/news/old-', csc:term(@date), '.html'), ' ', '_')}">
397 <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">]]>
401 <title>News for <xsl:value-of select="csc:term(@date)"/></title>
402 <style type="text/css">
403 <![CDATA[<!-- @import url('/default.css'); -->]]>
406 <body bgcolor="#ffffff">
407 <xsl:call-template name="header">
408 <xsl:with-param name="title" select="concat('News for ', csc:term(@date))"/>
410 <xsl:call-template name="news-by-term">
411 <xsl:with-param name="date" select="@date"/>
413 <xsl:call-template name="footer"/>
421 <xsl:template match="execlist">
422 <h3>Elected positions</h3>
424 <xsl:apply-templates select="exec[@type='elected']"/>
426 <h3>Appointed positions</h3>
428 <xsl:apply-templates select="exec[@type='appointed']"/>
432 <xsl:template match="exec">
433 <li><xsl:value-of select="@name"/> is this term's <b><xsl:value-of
434 select="@position"/></b>. You can <a
435 href="mailto:{@userid}@csclub.uwaterloo.ca">e-mail the <xsl:value-of select="@position"/></a><xsl:if
436 test="not(@href='')"> or <a href="{@href}">visit
438 <xsl:when test="@sex='male'"> his </xsl:when>
439 <xsl:when test="@sex='female'"> her </xsl:when>
440 <xsl:otherwise> his or her </xsl:otherwise>
442 homepage</a></xsl:if>.
446 <xsl:template match="*">
448 <xsl:copy-of select="@*" />
449 <xsl:apply-templates />