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 <style type="text/css">
18 <![CDATA[<!-- @import url('/default.css'); -->]]>
22 <xsl:apply-templates select="biglogo"/>
23 <xsl:apply-templates select="header">
24 <xsl:with-param name="title" select="@title"/>
25 </xsl:apply-templates>
26 <xsl:apply-templates select="section|menu"/>
27 <xsl:apply-templates select="footer"/>
32 <xsl:template match="section">
33 <h2><xsl:value-of select="@title"/></h2>
34 <xsl:apply-templates />
37 <xsl:template match="biglogo" name="biglogo">
38 <table cellspacing="0" cellpadding="0" border="0" align="center">
40 <td width="109"><a href="http://www.uwaterloo.ca/"><img
41 src="/logos/uw_logo_100_68.gif" alt="University of Waterloo"
42 width="100" height="68" align="center" border="0" /></a></td>
43 <td width="174"><a href="/"><img src="/logos/csc_160_70.png"
44 alt="Computer Science Club" width="165" height="75" align="center"
45 border="0" /></a></td>
46 <td width="91"><a href="http://www.acm.org"><img width="82"
47 height="103" src="/logos/acm_logo.gif" alt="A Student Chapter of
48 the ACM" align="center" border="0" /></a></td>
53 <xsl:template match="menuitem">
55 <a href="{@href}"><img border="0" src="/buttons/{@icon}.png"
56 width="40" height="40" alt="" /></a><br />
57 <a href="{@href}"><xsl:value-of select="@title"/></a>
61 <xsl:template match="menudefs">
62 <table cellspacing="1" cellpadding="3" border="0" bgcolor="black" align="center">
64 <xsl:apply-templates select="menuitem"/>
69 <xsl:template match="menu" name="menu">
70 <xsl:apply-templates select="document('menu.xml')/menudefs"/>
73 <xsl:template match="header" name="header">
74 <table cellspacing="0" cellpadding="2" border="0" width="100%"
77 <td width="84"><a href="/"><img src="/logos/csc_80_35.png"
78 alt="CSC" width="80" height="35" border="0" /></a></td>
79 <td class="pagetitle"><xsl:value-of select="$title"/></td>
84 select="document(concat($pwd,'/directory.xml'))/directory"/>
90 <xsl:template match="directory">
91 [<xsl:if test="@href = ''"><a href="index.html"><xsl:value-of
92 select="@title"/></a></xsl:if><xsl:if test="@href != ''">
93 <a href="{@href}"><xsl:value-of select="@title"/></a></xsl:if>]
94 <xsl:apply-templates match="diritem"/>
97 <xsl:template match="diritem">
98 [<a href="{@href}"><xsl:value-of select="@title"/></a>]
101 <xsl:template match="footer" name="footer">
103 <xsl:call-template name="menu"/>
105 This page was generated on <xsl:value-of select="$date"/> at
106 <xsl:value-of select="$time"/>.
109 We recently switched to our new website. The <a href="/old/">old
110 website (as of 2002-08-10)</a> is still available.
113 Copyright 2002 the Computer Science Club of the University of
114 Waterloo. 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"/>
123 <xsl:template match="newsitem">
125 <td class="newsdate"><xsl:value-of select="@date"/></td>
126 <td rowspan="2" valign="top" class="newsitem"><xsl:apply-templates/></td>
129 <td class="newsauthor"><xsl:value-of select="@author"/></td>
133 <xsl:template match="news" name="news">
135 <th colspan="2" class="news">
139 <xsl:apply-templates select="document('news.xml')/newsdefs"/>
141 <td class="newsitem" colspan="2">
142 <a href="news/">Older news items</a> are available. Make sure you
143 check out the <a href="nntp://uw.csc">uw.csc</a> newsgroup and our
144 announcement boards on the second and third floor of MC for more
150 <xsl:template match="events" name="events">
152 <th colspan="2" class="news">
156 <xsl:for-each select="document('events.xml')/eventdefs/eventitem">
157 <xsl:sort select="translate(@date, '-', '')"
160 <xsl:if test="translate(@date, '-', '') >= translate($date, '-', '')">
162 <td class="eventdate"><xsl:value-of select="@date"/></td>
163 <td rowspan="2" valign="top" class="eventitem">
164 <a href="{translate(concat('/events/', @room, '-', @date, '-', @time, '.html'), ' ', '_')}">
165 <xsl:value-of select="@title"/>
167 <xsl:value-of select="short"/>
171 <td class="eventroom"><xsl:value-of select="@time"/>,
172 <xsl:value-of select="@room"/></td>
177 <td class="eventitem" colspan="2"><a href="events/">Past
178 events</a> are available.</td>
182 <xsl:template match="eventdefs">
183 <xsl:apply-templates/>
186 <xsl:template match="eventitem">
187 <xsl:document method="html"
188 href="{translate(concat($root, '/events/', @room, '-', @date, '-', @time, '.html'), ' ', '_')}">
189 <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">]]>
193 <title><xsl:value-of select="@title"/></title>
194 <style type="text/css">
195 <![CDATA[<!-- @import url('/default.css'); -->]]>
199 <xsl:call-template name="header">
200 <xsl:with-param name="title" select="@title"/>
203 Held in <xsl:value-of select="@room"/> at
204 <xsl:value-of select="@date"/>, <xsl:value-of select="@time"/>.
207 <xsl:apply-templates select="abstract"/>
208 <xsl:call-template name="footer"/>
214 <xsl:template match="news-and-events">
215 <table cellspacing="1" cellpadding="2" bgcolor="black">
216 <xsl:call-template name="news"/>
217 <xsl:call-template name="events"/>
221 <xsl:template match="events-this-term" name="events-by-term">
222 <p>The events for <xsl:value-of select="csc:term($date)"/> are listed here.</p>
223 <xsl:for-each select="document('events.xml')/eventdefs/eventitem">
224 <xsl:sort select="translate(@date, '-', '')"
227 <xsl:if test="csc:term(@date) = csc:term($date)">
228 <h3><a href="{translate(concat('/events/', @room, '-', @date, '-', @time, '.html'), ' ', '_')}"><xsl:value-of select="@title"/></a></h3>
230 <b><xsl:value-of select="@room"/>,
231 <xsl:value-of select="@date"/>, <xsl:value-of
232 select="@time"/>: </b>
233 <xsl:value-of select="short"/>
234 <a href="{translate(concat('/events/', @room, '-', @date, '-', @time, '.html'), ' ', '_')}">
235 More information</a>.
241 <xsl:template match="members-this-term">
242 <p>The members for <xsl:value-of select="csc:term($date)"/> are
243 listed here. We currently have <xsl:value-of
244 select="count(document('members.xml')/memberlist/member)"/> members.</p>
251 <xsl:for-each select="document('members.xml')/memberlist/member">
253 <xsl:if test="position() mod 2 = 0">
254 <xsl:attribute name="bgcolor">#cee6ff</xsl:attribute>
256 <td><xsl:value-of select="@id"/></td>
257 <td><xsl:value-of select="@name"/></td>
258 <td><xsl:value-of select="@program"/></td>
264 <xsl:template match="all-books">
265 <p>The books we currently own include:</p>
271 <xsl:for-each select="document('books.xml')/booklist/book">
273 <xsl:if test="position() mod 2 = 0">
274 <xsl:attribute name="bgcolor">#cee6ff</xsl:attribute>
276 <td><a href="/office/books/{translate(@isbn, ' ', '_')}.html"><xsl:value-of
277 select="@title"/><xsl:if test="@edition != ''"> (<xsl:value-of
278 select="@edition"/>)</xsl:if></a></td>
279 <td><xsl:value-of select="@author"/></td>
281 <xsl:document method="html" href="{translate(concat($root, '/office/books/', @isbn, '.html'), ' ', '_')}">
282 <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">]]>
286 <title>Book: <xsl:value-of select="@title"/></title>
287 <style type="text/css">
288 <![CDATA[<!-- @import url('/default.css'); -->]]>
292 <xsl:call-template name="header">
293 <xsl:with-param name="title" select="@title"/>
294 <xsl:with-param name="pwd" select="concat($pwd, '/books')"/>
297 <b>Title: </b> <xsl:value-of select="@title"/><br />
298 <b>Edition: </b> <xsl:value-of select="@edition"/><br />
299 <b>ISBN: </b> <xsl:value-of select="@isbn"/><br />
300 <b>Author: </b> <xsl:value-of select="@author"/><br />
301 <b>Published: </b> <xsl:value-of select="@published"/><br />
303 <xsl:call-template name="footer"/>
311 <xsl:template match="generate-event-files">
312 <xsl:apply-templates select="document('events.xml')/eventdefs"/>
315 <xsl:key name="eventterm"
316 match="/eventdefs/eventitem"
317 use="csc:term(@date)" />
319 <xsl:template match="old-events">
321 select="document('events.xml')/eventdefs/eventitem">
323 <xsl:sort select="translate(@date, '-', '')"
328 test="not(preceding-sibling::*[csc:term(@date)=csc:term(current()/@date)]) and not(csc:term(@date) = csc:term($date))">
329 <p><a href="{translate(concat('old-',
330 csc:term(@date), '.html'), ' ', '_')}">
332 select="csc:term(@date)"/></a></p>
333 <xsl:document method="html" href="{translate(concat($root, '/events/old-', csc:term(@date), '.html'), ' ', '_')}">
334 <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">]]>
338 <title>Events for <xsl:value-of select="csc:term(@date)"/></title>
339 <style type="text/css">
340 <![CDATA[<!-- @import url('/default.css'); -->]]>
344 <xsl:call-template name="header">
345 <xsl:with-param name="title" select="concat('Events for ', csc:term(@date))"/>
347 <xsl:call-template name="events-by-term">
348 <xsl:with-param name="date" select="@date"/>
350 <xsl:call-template name="footer"/>
358 <xsl:template match="execlist">
359 <h3>Elected positions</h3>
361 <xsl:apply-templates select="exec[@type='elected']"/>
363 <h3>Appointed positions</h3>
365 <xsl:apply-templates select="exec[@type='appointed']"/>
369 <xsl:template match="exec">
370 <li><xsl:value-of select="@name"/> is this term's <b><xsl:value-of
371 select="@position"/></b>. You can <a
372 href="mailto:{@userid}@csclub.uwaterloo.ca">e-mail them</a><xsl:if
373 test="not(@href='')"> or <a href="{@href}">visit their
374 homepage</a></xsl:if>.
378 <xsl:template match="*">
380 <xsl:copy-of select="@*" />
381 <xsl:apply-templates />