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"/>.
111 <xsl:text disable-output-escaping="yes">&copy;</xsl:text>
112 2002<xsl:text disable-output-escaping="yes">&ndash;</xsl:text>2004
113 Computer Science Club of the University of Waterloo.<br />
114 KDE Crystal theme icons are copyright
115 <xsl:text disable-output-escaping="yes">&copy;</xsl:text>
116 2002 and following years KDE Artists.<br />
117 Please direct website comments to the <a
118 href="mailto:www@csclub.uwaterloo.ca">Webmaster</a>.
122 <xsl:template match="newsdefs">
123 <xsl:apply-templates select="newsitem[csc:term(@date) = csc:term($date)]">
124 <xsl:sort select="translate(@date, '-', '')"
127 </xsl:apply-templates>
130 <xsl:template match="newsitem">
132 <td class="newsdate" bgcolor="#eeeeff"><xsl:value-of select="@date"/></td>
133 <td rowspan="2" valign="top" class="newsitem" bgcolor="white"><xsl:apply-templates/></td>
136 <td class="newsauthor" bgcolor="#eeeeff"><xsl:value-of select="@author"/></td>
140 <xsl:template match="news" name="news">
142 <th colspan="2" class="news" bgcolor="#aaaaff">
146 <xsl:apply-templates select="document('news.xml')/newsdefs"/>
148 <td class="newsitem" bgcolor="white" colspan="2">
149 <a href="news/">Older news items</a> are available. Make sure you
150 check out the <a href="nntp://uw.csc">uw.csc</a> newsgroup and our
151 announcement boards on the second and third floor of MC for more
157 <xsl:template match="events" name="events">
159 <th colspan="2" class="news" bgcolor="#aaaaff">
163 <xsl:for-each select="document('events.xml')/eventdefs/eventitem">
164 <xsl:sort select="translate(@date, '-', '')"
167 <xsl:if test="translate(@date, '-', '') >= translate($date, '-', '')">
169 <td class="eventdate" bgcolor="#eeffee"><xsl:value-of select="@date"/></td>
170 <td rowspan="2" valign="top" class="eventitem" bgcolor="white">
171 <a href="{translate(concat('/events/', @room, '-', @date, '-', @time, '.html'), ' ', '_')}">
172 <xsl:value-of select="@title"/>
174 <xsl:value-of select="short"/>
178 <td class="eventroom" bgcolor="#eeffee"><xsl:value-of select="@time"/>,
179 <xsl:value-of select="@room"/></td>
184 <td class="eventitem" bgcolor="white" colspan="2"><a href="events/">Past
185 events</a> are available.</td>
189 <xsl:template match="eventdefs">
190 <xsl:apply-templates/>
193 <xsl:template match="eventitem">
194 <xsl:document method="html"
195 href="{translate(concat($root, '/events/', @room, '-', @date, '-', @time, '.html'), ' ', '_')}">
196 <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">]]>
200 <title><xsl:value-of select="@title"/></title>
201 <style type="text/css">
202 <![CDATA[<!-- @import url('/default.css'); -->]]>
205 <body bgcolor="#ffffff">
206 <xsl:call-template name="header">
207 <xsl:with-param name="title" select="@title"/>
210 Held in <xsl:value-of select="@room"/> at
211 <xsl:value-of select="@date"/>, <xsl:value-of select="@time"/>.
214 <xsl:apply-templates select="abstract"/>
215 <xsl:call-template name="footer"/>
221 <xsl:template match="news-and-events">
222 <table cellspacing="1" cellpadding="2" bgcolor="black">
223 <xsl:call-template name="events"/>
224 <xsl:call-template name="news"/>
228 <xsl:template match="events-this-term" name="events-by-term">
229 <p>The events for <xsl:value-of select="csc:term($date)"/> are listed here.</p>
230 <xsl:for-each select="document('events.xml')/eventdefs/eventitem">
231 <xsl:sort select="translate(@date, '-', '')"
234 <xsl:if test="csc:term(@date) = csc:term($date)">
235 <h3><a href="{translate(concat('/events/', @room, '-', @date, '-', @time, '.html'), ' ', '_')}"><xsl:value-of select="@title"/></a></h3>
237 <b><xsl:value-of select="@room"/>,
238 <xsl:value-of select="@date"/>, <xsl:value-of
239 select="@time"/>: </b>
240 <xsl:value-of select="short"/>
241 <a href="{translate(concat('/events/', @room, '-', @date, '-', @time, '.html'), ' ', '_')}">
242 More information</a>.
248 <xsl:template match="news-this-term" name="news-by-term">
249 <p>The news for <xsl:value-of select="csc:term($date)"/> is listed here.</p>
250 <xsl:for-each select="document('news.xml')/newsdefs/newsitem">
251 <xsl:sort select="translate(@date, '-', '')"
254 <xsl:if test="csc:term(@date) = csc:term($date)">
256 <b><xsl:value-of select="@date"/>,
257 <xsl:value-of select="@author"/>: </b> <xsl:apply-templates/>
263 <xsl:template match="members-this-term">
264 <p>The members for <xsl:value-of select="csc:term($date)"/> are
265 listed here. We currently have <xsl:value-of
266 select="count(document('members.xml')/memberlist/member)"/> members.</p>
273 <xsl:for-each select="document('members.xml')/memberlist/member">
275 <xsl:if test="position() mod 2 = 0">
276 <xsl:attribute name="bgcolor">#cee6ff</xsl:attribute>
278 <td><xsl:value-of select="@id"/></td>
279 <td><xsl:value-of select="@name"/></td>
280 <td><xsl:value-of select="@program"/></td>
286 <xsl:template match="all-books">
287 <p>The books we currently own include:</p>
293 <xsl:for-each select="document('books.xml')/booklist/book">
295 <xsl:if test="position() mod 2 = 0">
296 <xsl:attribute name="bgcolor">#cee6ff</xsl:attribute>
298 <td><a href="/office/books/{translate(@isbn, ' ', '_')}.html"><xsl:value-of
299 select="@title"/><xsl:if test="@edition != ''"> (<xsl:value-of
300 select="@edition"/>)</xsl:if></a></td>
301 <td><xsl:value-of select="@author"/></td>
303 <xsl:document method="html" href="{translate(concat($root, '/office/books/', @isbn, '.html'), ' ', '_')}">
304 <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">]]>
308 <title>Book: <xsl:value-of select="@title"/></title>
309 <style type="text/css">
310 <![CDATA[<!-- @import url('/default.css'); -->]]>
313 <body bgcolor="#ffffff">
314 <xsl:call-template name="header">
315 <xsl:with-param name="title" select="@title"/>
316 <xsl:with-param name="pwd" select="concat($pwd, '/books')"/>
319 <b>Title: </b> <xsl:value-of select="@title"/><br />
320 <b>Edition: </b> <xsl:value-of select="@edition"/><br />
321 <b>ISBN: </b> <xsl:value-of select="@isbn"/><br />
322 <b>Author: </b> <xsl:value-of select="@author"/><br />
323 <b>Published: </b> <xsl:value-of select="@published"/><br />
325 <xsl:call-template name="footer"/>
333 <xsl:template match="generate-event-files">
334 <xsl:apply-templates select="document('events.xml')/eventdefs"/>
337 <xsl:key name="eventterm"
338 match="/eventdefs/eventitem"
339 use="csc:term(@date)" />
341 <xsl:template match="old-events">
343 select="document('events.xml')/eventdefs/eventitem">
345 <xsl:sort select="translate(@date, '-', '')"
350 test="not(preceding-sibling::*[csc:term(@date)=csc:term(current()/@date)]) and not(csc:term(@date) = csc:term($date))">
351 <p><a href="{translate(concat('old-',
352 csc:term(@date), '.html'), ' ', '_')}">
354 select="csc:term(@date)"/></a></p>
355 <xsl:document method="html" href="{translate(concat($root, '/events/old-', csc:term(@date), '.html'), ' ', '_')}">
356 <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">]]>
360 <title>Events for <xsl:value-of select="csc:term(@date)"/></title>
361 <style type="text/css">
362 <![CDATA[<!-- @import url('/default.css'); -->]]>
365 <body bgcolor="#ffffff">
366 <xsl:call-template name="header">
367 <xsl:with-param name="title" select="concat('Events for ', csc:term(@date))"/>
369 <xsl:call-template name="events-by-term">
370 <xsl:with-param name="date" select="@date"/>
372 <xsl:call-template name="footer"/>
380 <xsl:key name="newsterm"
381 match="/newsdefs/newsitem"
382 use="csc:term(@date)" />
384 <xsl:template match="old-news">
386 select="document('news.xml')/newsdefs/newsitem">
388 <xsl:sort select="translate(@date, '-', '')"
393 test="not(preceding-sibling::*[csc:term(@date)=csc:term(current()/@date)]) and not(csc:term(@date) = csc:term($date))">
394 <p><a href="{translate(concat('old-',
395 csc:term(@date), '.html'), ' ', '_')}">
397 select="csc:term(@date)"/></a></p>
398 <xsl:document method="html" href="{translate(concat($root, '/news/old-', csc:term(@date), '.html'), ' ', '_')}">
399 <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">]]>
403 <title>News for <xsl:value-of select="csc:term(@date)"/></title>
404 <style type="text/css">
405 <![CDATA[<!-- @import url('/default.css'); -->]]>
408 <body bgcolor="#ffffff">
409 <xsl:call-template name="header">
410 <xsl:with-param name="title" select="concat('News for ', csc:term(@date))"/>
412 <xsl:call-template name="news-by-term">
413 <xsl:with-param name="date" select="@date"/>
415 <xsl:call-template name="footer"/>
423 <xsl:template match="execlist">
424 <h3>Elected positions</h3>
426 <xsl:apply-templates select="exec[@type='elected']"/>
428 <h3>Appointed positions</h3>
430 <xsl:apply-templates select="exec[@type='appointed']"/>
434 <xsl:template match="exec">
435 <li><xsl:value-of select="@name"/> is this term's <b><xsl:value-of
436 select="@position"/></b>. You can <a
437 href="mailto:{@userid}@csclub.uwaterloo.ca">e-mail the <xsl:value-of select="@position"/></a><xsl:if
438 test="not(@href='')"> or <a href="{@href}">visit
440 <xsl:when test="@sex='male'"> his </xsl:when>
441 <xsl:when test="@sex='female'"> her </xsl:when>
442 <xsl:otherwise> his or her </xsl:otherwise>
444 homepage</a></xsl:if>.
448 <xsl:template match="*">
450 <xsl:copy-of select="@*" />
451 <xsl:apply-templates />