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 Copyright © 2002-2004 Computer Science Club of the University of
112 KDE Crystal theme icons are copyright © 2002 and following years
114 Please direct website comments to the <a
115 href="mailto:www@csclub.uwaterloo.ca">Webmaster</a>.
119 <xsl:template match="newsdefs">
120 <xsl:apply-templates select="newsitem[csc:term(@date) = csc:term($date)]">
121 <xsl:sort select="translate(@date, '-', '')"
124 </xsl:apply-templates>
127 <xsl:template match="newsitem">
129 <td class="newsdate" bgcolor="#eeeeff"><xsl:value-of select="@date"/></td>
130 <td rowspan="2" valign="top" class="newsitem" bgcolor="white"><xsl:apply-templates/></td>
133 <td class="newsauthor" bgcolor="#eeeeff"><xsl:value-of select="@author"/></td>
137 <xsl:template match="news" name="news">
139 <th colspan="2" class="news" bgcolor="#aaaaff">
143 <xsl:apply-templates select="document('news.xml')/newsdefs"/>
145 <td class="newsitem" bgcolor="white" colspan="2">
146 <a href="news/">Older news items</a> are available. Make sure you
147 check out the <a href="nntp://uw.csc">uw.csc</a> newsgroup and our
148 announcement boards on the second and third floor of MC for more
154 <xsl:template match="events" name="events">
156 <th colspan="2" class="news" bgcolor="#aaaaff">
160 <xsl:for-each select="document('events.xml')/eventdefs/eventitem">
161 <xsl:sort select="translate(@date, '-', '')"
164 <xsl:if test="translate(@date, '-', '') >= translate($date, '-', '')">
166 <td class="eventdate" bgcolor="#eeffee"><xsl:value-of select="@date"/></td>
167 <td rowspan="2" valign="top" class="eventitem" bgcolor="white">
168 <a href="{translate(concat('/events/', @room, '-', @date, '-', @time, '.html'), ' ', '_')}">
169 <xsl:value-of select="@title"/>
171 <xsl:value-of select="short"/>
175 <td class="eventroom" bgcolor="#eeffee"><xsl:value-of select="@time"/>,
176 <xsl:value-of select="@room"/></td>
181 <td class="eventitem" bgcolor="white" colspan="2"><a href="events/">Past
182 events</a> are available.</td>
186 <xsl:template match="eventdefs">
187 <xsl:apply-templates/>
190 <xsl:template match="eventitem">
191 <xsl:document method="html"
192 href="{translate(concat($root, '/events/', @room, '-', @date, '-', @time, '.html'), ' ', '_')}">
193 <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">]]>
197 <title><xsl:value-of select="@title"/></title>
198 <style type="text/css">
199 <![CDATA[<!-- @import url('/default.css'); -->]]>
202 <body bgcolor="#ffffff">
203 <xsl:call-template name="header">
204 <xsl:with-param name="title" select="@title"/>
207 Held in <xsl:value-of select="@room"/> at
208 <xsl:value-of select="@date"/>, <xsl:value-of select="@time"/>.
211 <xsl:apply-templates select="abstract"/>
212 <xsl:call-template name="footer"/>
218 <xsl:template match="news-and-events">
219 <table cellspacing="1" cellpadding="2" bgcolor="black">
220 <xsl:call-template name="events"/>
221 <xsl:call-template name="news"/>
225 <xsl:template match="events-this-term" name="events-by-term">
226 <p>The events for <xsl:value-of select="csc:term($date)"/> are listed here.</p>
227 <xsl:for-each select="document('events.xml')/eventdefs/eventitem">
228 <xsl:sort select="translate(@date, '-', '')"
231 <xsl:if test="csc:term(@date) = csc:term($date)">
232 <h3><a href="{translate(concat('/events/', @room, '-', @date, '-', @time, '.html'), ' ', '_')}"><xsl:value-of select="@title"/></a></h3>
234 <b><xsl:value-of select="@room"/>,
235 <xsl:value-of select="@date"/>, <xsl:value-of
236 select="@time"/>: </b>
237 <xsl:value-of select="short"/>
238 <a href="{translate(concat('/events/', @room, '-', @date, '-', @time, '.html'), ' ', '_')}">
239 More information</a>.
245 <xsl:template match="news-this-term" name="news-by-term">
246 <p>The news for <xsl:value-of select="csc:term($date)"/> is listed here.</p>
247 <xsl:for-each select="document('news.xml')/newsdefs/newsitem">
248 <xsl:sort select="translate(@date, '-', '')"
251 <xsl:if test="csc:term(@date) = csc:term($date)">
253 <b><xsl:value-of select="@date"/>,
254 <xsl:value-of select="@author"/>: </b> <xsl:apply-templates/>
260 <xsl:template match="members-this-term">
261 <p>The members for <xsl:value-of select="csc:term($date)"/> are
262 listed here. We currently have <xsl:value-of
263 select="count(document('members.xml')/memberlist/member)"/> members.</p>
270 <xsl:for-each select="document('members.xml')/memberlist/member">
272 <xsl:if test="position() mod 2 = 0">
273 <xsl:attribute name="bgcolor">#cee6ff</xsl:attribute>
275 <td><xsl:value-of select="@id"/></td>
276 <td><xsl:value-of select="@name"/></td>
277 <td><xsl:value-of select="@program"/></td>
283 <xsl:template match="all-books">
284 <p>The books we currently own include:</p>
290 <xsl:for-each select="document('books.xml')/booklist/book">
292 <xsl:if test="position() mod 2 = 0">
293 <xsl:attribute name="bgcolor">#cee6ff</xsl:attribute>
295 <td><a href="/office/books/{translate(@isbn, ' ', '_')}.html"><xsl:value-of
296 select="@title"/><xsl:if test="@edition != ''"> (<xsl:value-of
297 select="@edition"/>)</xsl:if></a></td>
298 <td><xsl:value-of select="@author"/></td>
300 <xsl:document method="html" href="{translate(concat($root, '/office/books/', @isbn, '.html'), ' ', '_')}">
301 <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">]]>
305 <title>Book: <xsl:value-of select="@title"/></title>
306 <style type="text/css">
307 <![CDATA[<!-- @import url('/default.css'); -->]]>
310 <body bgcolor="#ffffff">
311 <xsl:call-template name="header">
312 <xsl:with-param name="title" select="@title"/>
313 <xsl:with-param name="pwd" select="concat($pwd, '/books')"/>
316 <b>Title: </b> <xsl:value-of select="@title"/><br />
317 <b>Edition: </b> <xsl:value-of select="@edition"/><br />
318 <b>ISBN: </b> <xsl:value-of select="@isbn"/><br />
319 <b>Author: </b> <xsl:value-of select="@author"/><br />
320 <b>Published: </b> <xsl:value-of select="@published"/><br />
322 <xsl:call-template name="footer"/>
330 <xsl:template match="generate-event-files">
331 <xsl:apply-templates select="document('events.xml')/eventdefs"/>
334 <xsl:key name="eventterm"
335 match="/eventdefs/eventitem"
336 use="csc:term(@date)" />
338 <xsl:template match="old-events">
340 select="document('events.xml')/eventdefs/eventitem">
342 <xsl:sort select="translate(@date, '-', '')"
347 test="not(preceding-sibling::*[csc:term(@date)=csc:term(current()/@date)]) and not(csc:term(@date) = csc:term($date))">
348 <p><a href="{translate(concat('old-',
349 csc:term(@date), '.html'), ' ', '_')}">
351 select="csc:term(@date)"/></a></p>
352 <xsl:document method="html" href="{translate(concat($root, '/events/old-', csc:term(@date), '.html'), ' ', '_')}">
353 <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">]]>
357 <title>Events for <xsl:value-of select="csc:term(@date)"/></title>
358 <style type="text/css">
359 <![CDATA[<!-- @import url('/default.css'); -->]]>
362 <body bgcolor="#ffffff">
363 <xsl:call-template name="header">
364 <xsl:with-param name="title" select="concat('Events for ', csc:term(@date))"/>
366 <xsl:call-template name="events-by-term">
367 <xsl:with-param name="date" select="@date"/>
369 <xsl:call-template name="footer"/>
377 <xsl:key name="newsterm"
378 match="/newsdefs/newsitem"
379 use="csc:term(@date)" />
381 <xsl:template match="old-news">
383 select="document('news.xml')/newsdefs/newsitem">
385 <xsl:sort select="translate(@date, '-', '')"
390 test="not(preceding-sibling::*[csc:term(@date)=csc:term(current()/@date)]) and not(csc:term(@date) = csc:term($date))">
391 <p><a href="{translate(concat('old-',
392 csc:term(@date), '.html'), ' ', '_')}">
394 select="csc:term(@date)"/></a></p>
395 <xsl:document method="html" href="{translate(concat($root, '/news/old-', csc:term(@date), '.html'), ' ', '_')}">
396 <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">]]>
400 <title>News for <xsl:value-of select="csc:term(@date)"/></title>
401 <style type="text/css">
402 <![CDATA[<!-- @import url('/default.css'); -->]]>
405 <body bgcolor="#ffffff">
406 <xsl:call-template name="header">
407 <xsl:with-param name="title" select="concat('News for ', csc:term(@date))"/>
409 <xsl:call-template name="news-by-term">
410 <xsl:with-param name="date" select="@date"/>
412 <xsl:call-template name="footer"/>
420 <xsl:template match="execlist">
421 <h3>Elected positions</h3>
423 <xsl:apply-templates select="exec[@type='elected']"/>
425 <h3>Appointed positions</h3>
427 <xsl:apply-templates select="exec[@type='appointed']"/>
431 <xsl:template match="exec">
432 <li><xsl:value-of select="@name"/> is this term's <b><xsl:value-of
433 select="@position"/></b>. You can <a
434 href="mailto:{@userid}@csclub.uwaterloo.ca">e-mail the <xsl:value-of select="@position"/></a><xsl:if
435 test="not(@href='')"> or <a href="{@href}">visit
437 <xsl:when test="@sex='male'"> his </xsl:when>
438 <xsl:when test="@sex='female'"> her </xsl:when>
439 <xsl:otherwise> his or her </xsl:otherwise>
441 homepage</a></xsl:if>.
445 <xsl:template match="*">
447 <xsl:copy-of select="@*" />
448 <xsl:apply-templates />