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="menu">
38 <table cellspacing="0" cellpadding="2" border="0" align="center">
40 <td width="174" rowspan="2"><img src="/logos/csc_160_70.png" alt="CSC" width="165" height="75" /></td>
41 <td>University of Waterloo</td>
44 <td>Computer Science Club</td>
49 <xsl:template match="menuitem">
51 <a href="{@href}"><img border="0" src="/buttons/{@icon}.png"
52 width="40" height="40" alt="" /></a><br />
53 <a href="{@href}"><xsl:value-of select="@title"/></a>
57 <xsl:template match="menudefs">
58 <table cellspacing="1" cellpadding="3" border="0" bgcolor="black" align="center">
60 <xsl:apply-templates select="menuitem"/>
65 <xsl:template match="menu" name="menu">
66 <xsl:apply-templates select="document('menu.xml')/menudefs"/>
69 <xsl:template match="header" name="header">
70 <table cellspacing="0" cellpadding="2" border="0" width="100%"
73 <td width="84"><a href="/"><img src="/logos/csc_80_35.png"
74 alt="CSC" width="80" height="35" border="0" /></a></td>
75 <td class="pagetitle"><xsl:value-of select="$title"/></td>
80 select="document(concat($pwd,'/directory.xml'))/directory"/>
86 <xsl:template match="directory">
87 [<a href="index.html"><xsl:value-of select="@title"/></a>]
88 <xsl:apply-templates match="diritem"/>
91 <xsl:template match="diritem">
92 [<a href="{@href}"><xsl:value-of select="@title"/></a>]
95 <xsl:template match="footer" name="footer">
97 <xsl:call-template name="menu"/>
99 This page was generated on <xsl:value-of select="$date"/> at
100 <xsl:value-of select="$time"/>.
103 Copyright 2002 the Computer Science Club of the University of
104 Waterloo. Please direct website comments to the <a
105 href="mailto:www@csclub.uwaterloo.ca">Webmaster</a>.
109 <xsl:template match="newsdefs">
110 <xsl:apply-templates select="newsitem"/>
113 <xsl:template match="newsitem">
115 <td class="newsdate"><xsl:value-of select="@date"/></td>
116 <td rowspan="2" valign="top" class="newsitem"><xsl:apply-templates/></td>
119 <td class="newsauthor"><xsl:value-of select="@author"/></td>
123 <xsl:template match="news" name="news">
125 <th colspan="2" class="news">
129 <xsl:apply-templates select="document('news.xml')/newsdefs"/>
131 <td class="newsitem" colspan="2">
132 <a href="news/">Older news items</a> are available. Make sure you
133 check out the <a href="nntp://uw.csc">uw.csc</a> newsgroup and our
134 announcement boards on the second and third floor of MC for more
140 <xsl:template match="events" name="events">
142 <th colspan="2" class="news">
146 <xsl:for-each select="document('events.xml')/eventdefs/eventitem">
147 <xsl:sort select="translate(@date, '-', '')"
150 <xsl:if test="translate(@date, '-', '') >= translate($date, '-', '')">
152 <td class="eventdate"><xsl:value-of select="@date"/></td>
153 <td rowspan="2" valign="top" class="eventitem">
154 <a href="{translate(concat('/events/', @room, '-', @date, '-', @time, '.html'), ' ', '_')}">
155 <xsl:value-of select="@title"/>
157 <xsl:value-of select="short"/>
161 <td class="eventroom"><xsl:value-of select="@time"/>,
162 <xsl:value-of select="@room"/></td>
167 <td class="eventitem" colspan="2"><a href="events/">Past
168 events</a> are available.</td>
172 <xsl:template match="eventdefs">
173 <xsl:apply-templates/>
176 <xsl:template match="eventitem">
177 <xsl:document method="html"
178 href="{translate(concat($root, '/events/', @room, '-', @date, '-', @time, '.html'), ' ', '_')}">
179 <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">]]>
183 <title><xsl:value-of select="@title"/></title>
184 <style type="text/css">
185 <![CDATA[<!-- @import url('/default.css'); -->]]>
189 <xsl:call-template name="header">
190 <xsl:with-param name="title" select="@title"/>
193 Held in <xsl:value-of select="@room"/> at
194 <xsl:value-of select="@date"/>, <xsl:value-of select="@time"/>.
197 <xsl:apply-templates select="abstract"/>
198 <xsl:call-template name="footer"/>
204 <xsl:template match="news-and-events">
205 <table cellspacing="1" cellpadding="2" bgcolor="black">
206 <xsl:call-template name="news"/>
207 <xsl:call-template name="events"/>
211 <xsl:template match="events-this-term">
212 <p>The events for <xsl:value-of select="csc:term($date)"/> are listed here.</p>
213 <xsl:for-each select="document('events.xml')/eventdefs/eventitem">
214 <xsl:sort select="translate(@date, '-', '')"
217 <xsl:if test="csc:term(@date) = csc:term($date)">
218 <h3><a href="{translate(concat('/events/', @room, '-', @date, '-', @time, '.html'), ' ', '_')}"><xsl:value-of select="@title"/></a></h3>
220 <b><xsl:value-of select="@room"/>,
221 <xsl:value-of select="@date"/>, <xsl:value-of
222 select="@time"/>: </b>
223 <xsl:value-of select="short"/>
224 <a href="{translate(concat('/events/', @room, '-', @date, '-', @time, '.html'), ' ', '_')}">
225 More information</a>.
231 <xsl:template match="members-this-term">
232 <p>The members for <xsl:value-of select="csc:term($date)"/> are
240 <xsl:for-each select="document('members.xml')/memberlist/member">
242 <td><xsl:value-of select="@id"/></td>
243 <td><xsl:value-of select="@name"/></td>
244 <td><xsl:value-of select="@program"/></td>
250 <xsl:template match="generate-event-files">
251 <xsl:apply-templates select="document('events.xml')/eventdefs"/>
254 <xsl:template match="old-events">
255 <xsl:for-each select="document('events.xml')/eventdefs/eventitem">
256 <xsl:sort select="term"
263 <xsl:template match="execlist">
264 <h3>Elected positions</h3>
266 <xsl:apply-templates select="exec[@type='elected']"/>
268 <h3>Appointed positions</h3>
270 <xsl:apply-templates select="exec[@type='appointed']"/>
274 <xsl:template match="exec">
275 <li><xsl:value-of select="@name"/> is this term's <b><xsl:value-of
276 select="@position"/></b>. You can <a
277 href="mailto:{@userid}@csclub.uwaterloo.ca">e-mail them</a><xsl:if
278 test="not(@href='')"> or <a href="{@href}">visit their
279 homepage</a></xsl:if>.
283 <xsl:template match="*">
285 <xsl:copy-of select="@*" />
286 <xsl:apply-templates />