3 <xsl:stylesheet version="1.1"
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 XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">]]>
14 <html xmlns="http://www.w3.org/1999/xhtml">
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 <xsl:param name="ext" />
57 <xsl:param name="pre" />
58 ,<a href="{$pre}/media/files/{@file}{$ext}"><xsl:value-of select="@type" />(<xsl:value-of select="@size" />)</a>
61 <xsl:template match="mediaitem">
62 <xsl:document method="html"
63 href="{translate(concat($root, '/media/', @title , '.html'), ' ', ' ')}">
64 <xsl:text disable-output-escaping="yes"><![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
65 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">]]>
67 <html xmlns="http://www.w3.org/1999/xhtml">
69 <title><xsl:value-of select="@title"/></title>
70 <style type="text/css">
71 <![CDATA[<!-- @import url('/default.css'); -->]]>
74 <body bgcolor="#ffffff">
75 <xsl:call-template name="header">
76 <xsl:with-param name="title" select="@title"/>
80 <xsl:apply-templates select="abstract"/>
83 Download <xsl:value-of select="@title"/> in a number of formats via
86 <xsl:param name="ext">Unset</xsl:param>
87 <xsl:apply-templates select="mediafile" >
88 <xsl:with-param name="ext">.torrent</xsl:with-param>
89 </xsl:apply-templates>
92 via dijjer (a mostly seemless bittorrent alternative):
93 <xsl:apply-templates select="mediafile" >
94 <xsl:with-param name="pre">http://dijjer.org/get/http://www.csclub.uwaterloo.ca</xsl:with-param>
95 </xsl:apply-templates>
98 via http (regular web browser):
99 <xsl:apply-templates select="mediafile" >
100 <xsl:with-param name="ext"></xsl:with-param>
101 </xsl:apply-templates>
105 <xsl:call-template name="footer"/>
109 <li><a href= "{@title}.html"><xsl:value-of select="@title" /></a> - <xsl:apply-templates select="mediafile" /></li>
112 <xsl:template match="menuitem">
113 <td class="menuitem button">
114 <a href="{@href}"><img border="0" src="/buttons/{@icon}.png"
115 width="40" height="40" alt="" /><!--</a>--><br />
116 <!--<a href="{@href}">--><xsl:value-of select="@title"/></a>
120 <xsl:template match="menudefs">
121 <div class="menuspace">
122 <table cellspacing="0" cellpadding="0" border="0" class="menubar">
124 <xsl:apply-templates select="menuitem"/>
130 <xsl:template match="menu" name="menu">
131 <xsl:apply-templates select="document('menu.xml')/menudefs"/>
134 <xsl:template match="header" name="header">
135 <table cellspacing="0" cellpadding="2" border="0" width="100%"
136 class="template-header">
138 <td width="84"><a href="/"><img src="/logos/csc_80_35.png"
139 alt="CSC" width="80" height="35" border="0" /></a></td>
140 <td class="pagetitle"><xsl:value-of select="$title"/></td>
145 select="document(concat($pwd,'/directory.xml'))/directory"/>
151 <xsl:template match="directory">
152 [<xsl:if test="@href = ''"><a href="index.html"><xsl:value-of
153 select="@title"/></a></xsl:if><xsl:if test="@href != ''">
154 <a href="{@href}"><xsl:value-of select="@title"/></a></xsl:if>]
155 <xsl:apply-templates match="diritem"/>
158 <xsl:template match="diritem">
159 [<a href="{@href}"><xsl:value-of select="@title"/></a>]
162 <xsl:template match="footer" name="footer">
164 <xsl:call-template name="menu"/>
166 This page was generated on <xsl:value-of select="$date"/> at
167 <xsl:value-of select="$time"/>.
171 <xsl:text disable-output-escaping="yes">&copy;</xsl:text>
172 2002<xsl:text disable-output-escaping="yes">&ndash;</xsl:text>2007
173 Computer Science Club of the University of Waterloo.<br />
174 KDE Crystal theme icons are copyright
175 <xsl:text disable-output-escaping="yes">&copy;</xsl:text>
176 2002 and following years KDE Artists.<br />
177 Please direct website comments to the <a
178 href="mailto:www@csclub.uwaterloo.ca">Webmaster</a>.
182 <xsl:template match="newsdefs">
183 <xsl:apply-templates select="newsitem[csc:term(@date) = csc:term($date)]">
184 <xsl:sort select="translate(@date, '-', '')"
187 </xsl:apply-templates>
190 <xsl:template match="newsitem">
192 <td class="newsdate" bgcolor="#eeeeff"><xsl:value-of select="@date"/></td>
193 <td rowspan="2" valign="top" class="newsitem" bgcolor="white"><xsl:apply-templates/></td>
196 <td class="newsauthor" bgcolor="#eeeeff"><xsl:value-of select="@author"/></td>
200 <xsl:template match="news" name="news">
202 <th colspan="2" class="news" bgcolor="#aaaaff">
206 <xsl:apply-templates select="document('news.xml')/newsdefs"/>
208 <td class="newsitem" bgcolor="white" colspan="2">
209 <a href="news/">Older news items</a> are available. Make sure you
210 check out the <a href="/newsgroup/thread.php?group=uw.csc">uw.csc</a> newsgroup and our
211 announcement boards on the second and third floor of MC for more
217 <xsl:template match="events" name="events">
219 <th colspan="2" class="news" bgcolor="#aaaaff">
223 <xsl:for-each select="document('events.xml')/eventdefs/eventitem">
224 <xsl:sort select="translate(@date, '-', '')"
227 <xsl:if test="translate(@date, '-', '') >= translate($date, '-', '')">
229 <td class="eventdate" bgcolor="#eeffee"><xsl:value-of select="@date"/></td>
230 <td rowspan="2" valign="top" class="eventitem" bgcolor="white">
231 <a href="{translate(concat('/events/', @room, '-', @date, '-', @time, '.html'), ' ', '_')}">
232 <xsl:value-of select="@title"/>
234 <xsl:value-of select="short"/>
238 <td class="eventroom" bgcolor="#eeffee"><xsl:value-of select="@time"/>,
239 <xsl:value-of select="@room"/></td>
244 <td class="eventitem" bgcolor="white" colspan="2"><a href="events/">Past
245 events</a> are available.</td>
249 <xsl:template match="eventdefs">
250 <xsl:apply-templates/>
253 <xsl:template match="eventitem">
254 <xsl:document method="html"
255 href="{translate(concat($root, '/events/', @room, '-', @date, '-', @time, '.html'), ' ', '_')}">
256 <xsl:text disable-output-escaping="yes"><![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">]]>
258 <html xmlns="http://www.w3.org/1999/xhtml">
260 <title><xsl:value-of select="@title"/></title>
261 <style type="text/css">
262 <![CDATA[<!-- @import url('/default.css'); -->]]>
265 <body bgcolor="#ffffff">
266 <xsl:call-template name="header">
267 <xsl:with-param name="title" select="@title"/>
270 Held in <xsl:value-of select="@room"/> at
271 <xsl:value-of select="@date"/>, <xsl:value-of select="@time"/>.
274 <xsl:apply-templates select="abstract"/>
275 <xsl:call-template name="footer"/>
281 <xsl:template match="news-and-events">
282 <table cellspacing="1" cellpadding="2" bgcolor="black">
283 <xsl:call-template name="events"/>
284 <xsl:call-template name="news"/>
288 <xsl:template match="events-this-term" name="events-by-term">
289 <p>The events for <xsl:value-of select="csc:term($date)"/> are listed here.</p>
290 <xsl:for-each select="document('events.xml')/eventdefs/eventitem">
291 <xsl:sort select="translate(@date, '-', '')"
294 <xsl:if test="csc:term(@date) = csc:term($date)">
295 <h3><a href="{translate(concat('/events/', @room, '-', @date, '-', @time, '.html'), ' ', '_')}"><xsl:value-of select="@title"/></a></h3>
297 <b><xsl:value-of select="@room"/>,
298 <xsl:value-of select="@date"/>, <xsl:value-of
299 select="@time"/>: </b>
300 <xsl:value-of select="short"/>
301 <a href="{translate(concat('/events/', @room, '-', @date, '-', @time, '.html'), ' ', '_')}">
302 More information</a>.
308 <xsl:template match="news-this-term" name="news-by-term">
309 <p>The news for <xsl:value-of select="csc:term($date)"/> is listed here.</p>
310 <xsl:for-each select="document('news.xml')/newsdefs/newsitem">
311 <xsl:sort select="translate(@date, '-', '')"
314 <xsl:if test="csc:term(@date) = csc:term($date)">
316 <b><xsl:value-of select="@date"/>,
317 <xsl:value-of select="@author"/>: </b> <xsl:apply-templates/>
323 <xsl:template match="members-this-term">
324 <p>The members for <xsl:value-of select="csc:term($date)"/> are
325 listed here. We currently have <xsl:value-of
326 select="count(document('members.xml')/memberlist/member)"/> members.</p>
333 <xsl:for-each select="document('members.xml')/memberlist/member">
335 <xsl:if test="position() mod 2 = 0">
336 <xsl:attribute name="bgcolor">#cee6ff</xsl:attribute>
338 <td><xsl:value-of select="@id"/></td>
339 <td><xsl:value-of select="@name"/></td>
340 <td><xsl:value-of select="@program"/></td>
346 <xsl:template match="all-books">
347 <p>The books we currently own include:</p>
353 <xsl:for-each select="document('books.xml')/booklist/book">
355 <xsl:if test="position() mod 2 = 0">
356 <xsl:attribute name="bgcolor">#cee6ff</xsl:attribute>
358 <td><a href="/office/books/{translate(@isbn, ' ', '_')}.html"><xsl:value-of
359 select="@title"/><xsl:if test="@edition != ''"> (<xsl:value-of
360 select="@edition"/>)</xsl:if></a></td>
361 <td><xsl:value-of select="@author"/></td>
363 <xsl:document method="html" href="{translate(concat($root, '/office/books/', @isbn, '.html'), ' ', '_')}">
364 <xsl:text disable-output-escaping="yes"><![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">]]>
366 <html xmlns="http://www.w3.org/1999/xhtml">
368 <title>Book: <xsl:value-of select="@title"/></title>
369 <style type="text/css">
370 <![CDATA[<!-- @import url('/default.css'); -->]]>
373 <body bgcolor="#ffffff">
374 <xsl:call-template name="header">
375 <xsl:with-param name="title" select="@title"/>
376 <xsl:with-param name="pwd" select="concat($pwd, '/books')"/>
379 <b>Title: </b> <xsl:value-of select="@title"/><br />
380 <b>Edition: </b> <xsl:value-of select="@edition"/><br />
381 <b>ISBN: </b> <xsl:value-of select="@isbn"/><br />
382 <b>Author: </b> <xsl:value-of select="@author"/><br />
383 <b>Published: </b> <xsl:value-of select="@published"/><br />
385 <xsl:call-template name="footer"/>
393 <xsl:template match="generate-event-files">
394 <xsl:apply-templates select="document('events.xml')/eventdefs"/>
397 <xsl:key name="eventterm"
398 match="/eventdefs/eventitem"
399 use="csc:term(@date)" />
401 <xsl:template match="old-events">
403 select="document('events.xml')/eventdefs/eventitem">
405 <xsl:sort select="translate(@date, '-', '')"
410 test="not(preceding-sibling::*[csc:term(@date)=csc:term(current()/@date)]) and not(csc:term(@date) = csc:term($date))">
411 <p><a href="{translate(concat('old-',
412 csc:term(@date), '.html'), ' ', '_')}">
414 select="csc:term(@date)"/></a></p>
415 <xsl:document method="html" href="{translate(concat($root, '/events/old-', csc:term(@date), '.html'), ' ', '_')}">
416 <xsl:text disable-output-escaping="yes"><![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">]]>
418 <html xmlns="http://www.w3.org/1999/xhtml">
420 <title>Events for <xsl:value-of select="csc:term(@date)"/></title>
421 <style type="text/css">
422 <![CDATA[<!-- @import url('/default.css'); -->]]>
425 <body bgcolor="#ffffff">
426 <xsl:call-template name="header">
427 <xsl:with-param name="title" select="concat('Events for ', csc:term(@date))"/>
429 <xsl:call-template name="events-by-term">
430 <xsl:with-param name="date" select="@date"/>
432 <xsl:call-template name="footer"/>
440 <xsl:key name="newsterm"
441 match="/newsdefs/newsitem"
442 use="csc:term(@date)" />
444 <xsl:template match="old-news">
446 select="document('news.xml')/newsdefs/newsitem">
448 <xsl:sort select="translate(@date, '-', '')"
453 test="not(preceding-sibling::*[csc:term(@date)=csc:term(current()/@date)]) and not(csc:term(@date) = csc:term($date))">
454 <p><a href="{translate(concat('old-',
455 csc:term(@date), '.html'), ' ', '_')}">
457 select="csc:term(@date)"/></a></p>
458 <xsl:document method="html" href="{translate(concat($root, '/news/old-', csc:term(@date), '.html'), ' ', '_')}">
459 <xsl:text disable-output-escaping="yes"><![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">]]>
461 <html xmlns="http://www.w3.org/1999/xhtml">
463 <title>News for <xsl:value-of select="csc:term(@date)"/></title>
464 <style type="text/css">
465 <![CDATA[<!-- @import url('/default.css'); -->]]>
468 <body bgcolor="#ffffff">
469 <xsl:call-template name="header">
470 <xsl:with-param name="title" select="concat('News for ', csc:term(@date))"/>
472 <xsl:call-template name="news-by-term">
473 <xsl:with-param name="date" select="@date"/>
475 <xsl:call-template name="footer"/>
483 <xsl:template match="execlist">
484 <h3>Elected positions</h3>
486 <xsl:apply-templates select="exec[@type='elected']"/>
488 <h3>Appointed positions</h3>
490 <xsl:apply-templates select="exec[@type='appointed']"/>
494 <xsl:template match="exec">
495 <li><xsl:value-of select="@name"/> is this term's <b><xsl:value-of
496 select="@position"/></b>. You can <a
497 href="mailto:{@userid}@csclub.uwaterloo.ca">e-mail the <xsl:value-of select="@position"/></a><xsl:if
498 test="not(@href='')"> or <a href="{@href}">visit
500 <xsl:when test="@sex='male'"> his </xsl:when>
501 <xsl:when test="@sex='female'"> her </xsl:when>
502 <xsl:otherwise> his or her </xsl:otherwise>
504 homepage</a></xsl:if>.
508 <xsl:template match="*">
510 <xsl:copy-of select="@*" />
511 <xsl:apply-templates />