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 Copyright 2002 the Computer Science Club of the University of
110 Waterloo. Please direct website comments to the <a
111 href="mailto:www@csclub.uwaterloo.ca">Webmaster</a>.
115 <xsl:template match="newsdefs">
116 <xsl:apply-templates select="newsitem"/>
119 <xsl:template match="newsitem">
121 <td class="newsdate"><xsl:value-of select="@date"/></td>
122 <td rowspan="2" valign="top" class="newsitem"><xsl:apply-templates/></td>
125 <td class="newsauthor"><xsl:value-of select="@author"/></td>
129 <xsl:template match="news" name="news">
131 <th colspan="2" class="news">
135 <xsl:apply-templates select="document('news.xml')/newsdefs"/>
137 <td class="newsitem" colspan="2">
138 <a href="news/">Older news items</a> are available. Make sure you
139 check out the <a href="nntp://uw.csc">uw.csc</a> newsgroup and our
140 announcement boards on the second and third floor of MC for more
146 <xsl:template match="events" name="events">
148 <th colspan="2" class="news">
152 <xsl:for-each select="document('events.xml')/eventdefs/eventitem">
153 <xsl:sort select="translate(@date, '-', '')"
156 <xsl:if test="translate(@date, '-', '') >= translate($date, '-', '')">
158 <td class="eventdate"><xsl:value-of select="@date"/></td>
159 <td rowspan="2" valign="top" class="eventitem">
160 <a href="{translate(concat('/events/', @room, '-', @date, '-', @time, '.html'), ' ', '_')}">
161 <xsl:value-of select="@title"/>
163 <xsl:value-of select="short"/>
167 <td class="eventroom"><xsl:value-of select="@time"/>,
168 <xsl:value-of select="@room"/></td>
173 <td class="eventitem" colspan="2"><a href="events/">Past
174 events</a> are available.</td>
178 <xsl:template match="eventdefs">
179 <xsl:apply-templates/>
182 <xsl:template match="eventitem">
183 <xsl:document method="html"
184 href="{translate(concat($root, '/events/', @room, '-', @date, '-', @time, '.html'), ' ', '_')}">
185 <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">]]>
189 <title><xsl:value-of select="@title"/></title>
190 <style type="text/css">
191 <![CDATA[<!-- @import url('/default.css'); -->]]>
195 <xsl:call-template name="header">
196 <xsl:with-param name="title" select="@title"/>
199 Held in <xsl:value-of select="@room"/> at
200 <xsl:value-of select="@date"/>, <xsl:value-of select="@time"/>.
203 <xsl:apply-templates select="abstract"/>
204 <xsl:call-template name="footer"/>
210 <xsl:template match="news-and-events">
211 <table cellspacing="1" cellpadding="2" bgcolor="black">
212 <xsl:call-template name="news"/>
213 <xsl:call-template name="events"/>
217 <xsl:template match="events-this-term" name="events-by-term">
218 <p>The events for <xsl:value-of select="csc:term($date)"/> are listed here.</p>
219 <xsl:for-each select="document('events.xml')/eventdefs/eventitem">
220 <xsl:sort select="translate(@date, '-', '')"
223 <xsl:if test="csc:term(@date) = csc:term($date)">
224 <h3><a href="{translate(concat('/events/', @room, '-', @date, '-', @time, '.html'), ' ', '_')}"><xsl:value-of select="@title"/></a></h3>
226 <b><xsl:value-of select="@room"/>,
227 <xsl:value-of select="@date"/>, <xsl:value-of
228 select="@time"/>: </b>
229 <xsl:value-of select="short"/>
230 <a href="{translate(concat('/events/', @room, '-', @date, '-', @time, '.html'), ' ', '_')}">
231 More information</a>.
237 <xsl:template match="members-this-term">
238 <p>The members for <xsl:value-of select="csc:term($date)"/> are
246 <xsl:for-each select="document('members.xml')/memberlist/member">
248 <xsl:if test="position() mod 2 = 0">
249 <xsl:attribute name="bgcolor">#cee6ff</xsl:attribute>
251 <td><xsl:value-of select="@id"/></td>
252 <td><xsl:value-of select="@name"/></td>
253 <td><xsl:value-of select="@program"/></td>
259 <xsl:template match="all-books">
260 <p>The books we currently own include:</p>
266 <xsl:for-each select="document('books.xml')/booklist/book">
268 <xsl:if test="position() mod 2 = 0">
269 <xsl:attribute name="bgcolor">#cee6ff</xsl:attribute>
271 <td><a href="/office/books/{translate(@isbn, ' ', '_')}.html"><xsl:value-of
272 select="@title"/><xsl:if test="@edition != ''"> (<xsl:value-of
273 select="@edition"/>)</xsl:if></a></td>
274 <td><xsl:value-of select="@author"/></td>
276 <xsl:document method="html" href="{translate(concat($root, '/office/books/', @isbn, '.html'), ' ', '_')}">
277 <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">]]>
281 <title>Book: <xsl:value-of select="@title"/></title>
282 <style type="text/css">
283 <![CDATA[<!-- @import url('/default.css'); -->]]>
287 <xsl:call-template name="header">
288 <xsl:with-param name="title" select="@title"/>
289 <xsl:with-param name="pwd" select="concat($pwd, '/books')"/>
292 <b>Title: </b> <xsl:value-of select="@title"/><br />
293 <b>Edition: </b> <xsl:value-of select="@edition"/><br />
294 <b>ISBN: </b> <xsl:value-of select="@isbn"/><br />
295 <b>Author: </b> <xsl:value-of select="@author"/><br />
296 <b>Published: </b> <xsl:value-of select="@published"/><br />
298 <xsl:call-template name="footer"/>
306 <xsl:template match="generate-event-files">
307 <xsl:apply-templates select="document('events.xml')/eventdefs"/>
310 <xsl:key name="eventterm"
311 match="/eventdefs/eventitem"
312 use="csc:term(@date)" />
314 <xsl:template match="old-events">
316 select="document('events.xml')/eventdefs/eventitem">
318 <xsl:sort select="translate(@date, '-', '')"
323 test="not(preceding-sibling::*[csc:term(@date)=csc:term(current()/@date)]) and not(csc:term(@date) = csc:term($date))">
324 <p><a href="{translate(concat('old-',
325 csc:term(@date), '.html'), ' ', '_')}">
327 select="csc:term(@date)"/></a></p>
328 <xsl:document method="html" href="{translate(concat($root, '/events/old-', csc:term(@date), '.html'), ' ', '_')}">
329 <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">]]>
333 <title>Events for <xsl:value-of select="csc:term(@date)"/></title>
334 <style type="text/css">
335 <![CDATA[<!-- @import url('/default.css'); -->]]>
339 <xsl:call-template name="header">
340 <xsl:with-param name="title" select="concat('Events for ', csc:term(@date))"/>
342 <xsl:call-template name="events-by-term">
343 <xsl:with-param name="date" select="@date"/>
345 <xsl:call-template name="footer"/>
353 <xsl:template match="execlist">
354 <h3>Elected positions</h3>
356 <xsl:apply-templates select="exec[@type='elected']"/>
358 <h3>Appointed positions</h3>
360 <xsl:apply-templates select="exec[@type='appointed']"/>
364 <xsl:template match="exec">
365 <li><xsl:value-of select="@name"/> is this term's <b><xsl:value-of
366 select="@position"/></b>. You can <a
367 href="mailto:{@userid}@csclub.uwaterloo.ca">e-mail them</a><xsl:if
368 test="not(@href='')"> or <a href="{@href}">visit their
369 homepage</a></xsl:if>.
373 <xsl:template match="*">
375 <xsl:copy-of select="@*" />
376 <xsl:apply-templates />