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 <xsl:if test="@id != ''"><a id="{@id}" /></xsl:if>
35 <h2><xsl:value-of select="@title"/></h2>
36 <xsl:apply-templates />
39 <xsl:template match="biglogo" name="biglogo">
40 <table cellspacing="0" cellpadding="0" border="0" align="center">
42 <td width="109"><a href="http://www.uwaterloo.ca/"><img
43 src="/logos/uw_logo_100_68.gif" alt="University of Waterloo"
44 width="100" height="68" align="center" border="0" /></a></td>
45 <td width="174"><a href="/"><img src="/logos/csc_160_70.png"
46 alt="Computer Science Club" width="165" height="75" align="center"
47 border="0" /></a></td>
48 <td width="91"><a href="http://www.acm.org"><img width="82"
49 height="103" src="/logos/acm_logo.gif" alt="A Student Chapter of
50 the ACM" align="center" border="0" /></a></td>
55 <xsl:template match="mediafile" >
56 ,<a href="/media/files/{@file}"><xsl:value-of select="@type" />(<xsl:value-of select="@size" />)</a>
59 <xsl:template match="mediaitem">
60 <li><xsl:value-of select="@title" /> - <xsl:apply-templates select="mediafile" /></li>
63 <xsl:template match="menuitem">
64 <td bgcolor="#eeeeee" class="button">
65 <a href="{@href}"><img border="0" src="/buttons/{@icon}.png"
66 width="40" height="40" alt="" /></a><br />
67 <a href="{@href}"><xsl:value-of select="@title"/></a>
71 <xsl:template match="menudefs">
72 <table cellspacing="1" cellpadding="3" border="0" bgcolor="black" align="center">
74 <xsl:apply-templates select="menuitem"/>
79 <xsl:template match="menu" name="menu">
80 <xsl:apply-templates select="document('menu.xml')/menudefs"/>
83 <xsl:template match="header" name="header">
84 <table cellspacing="0" cellpadding="2" border="0" width="100%"
87 <td width="84"><a href="/"><img src="/logos/csc_80_35.png"
88 alt="CSC" width="80" height="35" border="0" /></a></td>
89 <td class="pagetitle"><xsl:value-of select="$title"/></td>
94 select="document(concat($pwd,'/directory.xml'))/directory"/>
100 <xsl:template match="directory">
101 [<xsl:if test="@href = ''"><a href="index.html"><xsl:value-of
102 select="@title"/></a></xsl:if><xsl:if test="@href != ''">
103 <a href="{@href}"><xsl:value-of select="@title"/></a></xsl:if>]
104 <xsl:apply-templates match="diritem"/>
107 <xsl:template match="diritem">
108 [<a href="{@href}"><xsl:value-of select="@title"/></a>]
111 <xsl:template match="footer" name="footer">
113 <xsl:call-template name="menu"/>
115 This page was generated on <xsl:value-of select="$date"/> at
116 <xsl:value-of select="$time"/>.
120 <xsl:text disable-output-escaping="yes">&copy;</xsl:text>
121 2002<xsl:text disable-output-escaping="yes">&ndash;</xsl:text>2004
122 Computer Science Club of the University of Waterloo.<br />
123 KDE Crystal theme icons are copyright
124 <xsl:text disable-output-escaping="yes">&copy;</xsl:text>
125 2002 and following years KDE Artists.<br />
126 Please direct website comments to the <a
127 href="mailto:www@csclub.uwaterloo.ca">Webmaster</a>.
131 <xsl:template match="newsdefs">
132 <xsl:apply-templates select="newsitem[csc:term(@date) = csc:term($date)]">
133 <xsl:sort select="translate(@date, '-', '')"
136 </xsl:apply-templates>
139 <xsl:template match="newsitem">
141 <td class="newsdate" bgcolor="#eeeeff"><xsl:value-of select="@date"/></td>
142 <td rowspan="2" valign="top" class="newsitem" bgcolor="white"><xsl:apply-templates/></td>
145 <td class="newsauthor" bgcolor="#eeeeff"><xsl:value-of select="@author"/></td>
149 <xsl:template match="news" name="news">
151 <th colspan="2" class="news" bgcolor="#aaaaff">
155 <xsl:apply-templates select="document('news.xml')/newsdefs"/>
157 <td class="newsitem" bgcolor="white" colspan="2">
158 <a href="news/">Older news items</a> are available. Make sure you
159 check out the <a href="nntp://uw.csc">uw.csc</a> newsgroup and our
160 announcement boards on the second and third floor of MC for more
166 <xsl:template match="events" name="events">
168 <th colspan="2" class="news" bgcolor="#aaaaff">
172 <xsl:for-each select="document('events.xml')/eventdefs/eventitem">
173 <xsl:sort select="translate(@date, '-', '')"
176 <xsl:if test="translate(@date, '-', '') >= translate($date, '-', '')">
178 <td class="eventdate" bgcolor="#eeffee"><xsl:value-of select="@date"/></td>
179 <td rowspan="2" valign="top" class="eventitem" bgcolor="white">
180 <a href="{translate(concat('/events/', @room, '-', @date, '-', @time, '.html'), ' ', '_')}">
181 <xsl:value-of select="@title"/>
183 <xsl:value-of select="short"/>
187 <td class="eventroom" bgcolor="#eeffee"><xsl:value-of select="@time"/>,
188 <xsl:value-of select="@room"/></td>
193 <td class="eventitem" bgcolor="white" colspan="2"><a href="events/">Past
194 events</a> are available.</td>
198 <xsl:template match="eventdefs">
199 <xsl:apply-templates/>
202 <xsl:template match="eventitem">
203 <xsl:document method="html"
204 href="{translate(concat($root, '/events/', @room, '-', @date, '-', @time, '.html'), ' ', '_')}">
205 <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">]]>
209 <title><xsl:value-of select="@title"/></title>
210 <style type="text/css">
211 <![CDATA[<!-- @import url('/default.css'); -->]]>
214 <body bgcolor="#ffffff">
215 <xsl:call-template name="header">
216 <xsl:with-param name="title" select="@title"/>
219 Held in <xsl:value-of select="@room"/> at
220 <xsl:value-of select="@date"/>, <xsl:value-of select="@time"/>.
223 <xsl:apply-templates select="abstract"/>
224 <xsl:call-template name="footer"/>
230 <xsl:template match="news-and-events">
231 <table cellspacing="1" cellpadding="2" bgcolor="black">
232 <xsl:call-template name="events"/>
233 <xsl:call-template name="news"/>
237 <xsl:template match="events-this-term" name="events-by-term">
238 <p>The events for <xsl:value-of select="csc:term($date)"/> are listed here.</p>
239 <xsl:for-each select="document('events.xml')/eventdefs/eventitem">
240 <xsl:sort select="translate(@date, '-', '')"
243 <xsl:if test="csc:term(@date) = csc:term($date)">
244 <h3><a href="{translate(concat('/events/', @room, '-', @date, '-', @time, '.html'), ' ', '_')}"><xsl:value-of select="@title"/></a></h3>
246 <b><xsl:value-of select="@room"/>,
247 <xsl:value-of select="@date"/>, <xsl:value-of
248 select="@time"/>: </b>
249 <xsl:value-of select="short"/>
250 <a href="{translate(concat('/events/', @room, '-', @date, '-', @time, '.html'), ' ', '_')}">
251 More information</a>.
257 <xsl:template match="news-this-term" name="news-by-term">
258 <p>The news for <xsl:value-of select="csc:term($date)"/> is listed here.</p>
259 <xsl:for-each select="document('news.xml')/newsdefs/newsitem">
260 <xsl:sort select="translate(@date, '-', '')"
263 <xsl:if test="csc:term(@date) = csc:term($date)">
265 <b><xsl:value-of select="@date"/>,
266 <xsl:value-of select="@author"/>: </b> <xsl:apply-templates/>
272 <xsl:template match="members-this-term">
273 <p>The members for <xsl:value-of select="csc:term($date)"/> are
274 listed here. We currently have <xsl:value-of
275 select="count(document('members.xml')/memberlist/member)"/> members.</p>
282 <xsl:for-each select="document('members.xml')/memberlist/member">
284 <xsl:if test="position() mod 2 = 0">
285 <xsl:attribute name="bgcolor">#cee6ff</xsl:attribute>
287 <td><xsl:value-of select="@id"/></td>
288 <td><xsl:value-of select="@name"/></td>
289 <td><xsl:value-of select="@program"/></td>
295 <xsl:template match="all-books">
296 <p>The books we currently own include:</p>
302 <xsl:for-each select="document('books.xml')/booklist/book">
304 <xsl:if test="position() mod 2 = 0">
305 <xsl:attribute name="bgcolor">#cee6ff</xsl:attribute>
307 <td><a href="/office/books/{translate(@isbn, ' ', '_')}.html"><xsl:value-of
308 select="@title"/><xsl:if test="@edition != ''"> (<xsl:value-of
309 select="@edition"/>)</xsl:if></a></td>
310 <td><xsl:value-of select="@author"/></td>
312 <xsl:document method="html" href="{translate(concat($root, '/office/books/', @isbn, '.html'), ' ', '_')}">
313 <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">]]>
317 <title>Book: <xsl:value-of select="@title"/></title>
318 <style type="text/css">
319 <![CDATA[<!-- @import url('/default.css'); -->]]>
322 <body bgcolor="#ffffff">
323 <xsl:call-template name="header">
324 <xsl:with-param name="title" select="@title"/>
325 <xsl:with-param name="pwd" select="concat($pwd, '/books')"/>
328 <b>Title: </b> <xsl:value-of select="@title"/><br />
329 <b>Edition: </b> <xsl:value-of select="@edition"/><br />
330 <b>ISBN: </b> <xsl:value-of select="@isbn"/><br />
331 <b>Author: </b> <xsl:value-of select="@author"/><br />
332 <b>Published: </b> <xsl:value-of select="@published"/><br />
334 <xsl:call-template name="footer"/>
342 <xsl:template match="generate-event-files">
343 <xsl:apply-templates select="document('events.xml')/eventdefs"/>
346 <xsl:key name="eventterm"
347 match="/eventdefs/eventitem"
348 use="csc:term(@date)" />
350 <xsl:template match="old-events">
352 select="document('events.xml')/eventdefs/eventitem">
354 <xsl:sort select="translate(@date, '-', '')"
359 test="not(preceding-sibling::*[csc:term(@date)=csc:term(current()/@date)]) and not(csc:term(@date) = csc:term($date))">
360 <p><a href="{translate(concat('old-',
361 csc:term(@date), '.html'), ' ', '_')}">
363 select="csc:term(@date)"/></a></p>
364 <xsl:document method="html" href="{translate(concat($root, '/events/old-', csc:term(@date), '.html'), ' ', '_')}">
365 <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">]]>
369 <title>Events for <xsl:value-of select="csc:term(@date)"/></title>
370 <style type="text/css">
371 <![CDATA[<!-- @import url('/default.css'); -->]]>
374 <body bgcolor="#ffffff">
375 <xsl:call-template name="header">
376 <xsl:with-param name="title" select="concat('Events for ', csc:term(@date))"/>
378 <xsl:call-template name="events-by-term">
379 <xsl:with-param name="date" select="@date"/>
381 <xsl:call-template name="footer"/>
389 <xsl:key name="newsterm"
390 match="/newsdefs/newsitem"
391 use="csc:term(@date)" />
393 <xsl:template match="old-news">
395 select="document('news.xml')/newsdefs/newsitem">
397 <xsl:sort select="translate(@date, '-', '')"
402 test="not(preceding-sibling::*[csc:term(@date)=csc:term(current()/@date)]) and not(csc:term(@date) = csc:term($date))">
403 <p><a href="{translate(concat('old-',
404 csc:term(@date), '.html'), ' ', '_')}">
406 select="csc:term(@date)"/></a></p>
407 <xsl:document method="html" href="{translate(concat($root, '/news/old-', csc:term(@date), '.html'), ' ', '_')}">
408 <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">]]>
412 <title>News for <xsl:value-of select="csc:term(@date)"/></title>
413 <style type="text/css">
414 <![CDATA[<!-- @import url('/default.css'); -->]]>
417 <body bgcolor="#ffffff">
418 <xsl:call-template name="header">
419 <xsl:with-param name="title" select="concat('News for ', csc:term(@date))"/>
421 <xsl:call-template name="news-by-term">
422 <xsl:with-param name="date" select="@date"/>
424 <xsl:call-template name="footer"/>
432 <xsl:template match="execlist">
433 <h3>Elected positions</h3>
435 <xsl:apply-templates select="exec[@type='elected']"/>
437 <h3>Appointed positions</h3>
439 <xsl:apply-templates select="exec[@type='appointed']"/>
443 <xsl:template match="exec">
444 <li><xsl:value-of select="@name"/> is this term's <b><xsl:value-of
445 select="@position"/></b>. You can <a
446 href="mailto:{@userid}@csclub.uwaterloo.ca">e-mail the <xsl:value-of select="@position"/></a><xsl:if
447 test="not(@href='')"> or <a href="{@href}">visit
449 <xsl:when test="@sex='male'"> his </xsl:when>
450 <xsl:when test="@sex='female'"> her </xsl:when>
451 <xsl:otherwise> his or her </xsl:otherwise>
453 homepage</a></xsl:if>.
457 <xsl:template match="*">
459 <xsl:copy-of select="@*" />
460 <xsl:apply-templates />