www/cscweb.xsl

595 lines
20 KiB
XML
Raw Normal View History

2002-03-11 15:39:54 -05:00
<?xml version='1.0'?>
2006-06-21 21:53:00 -04:00
<xsl:stylesheet version="1.1"
2002-04-15 13:37:12 -04:00
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:csc="http://www.csclub.uwaterloo.ca/cow"
extension-element-prefixes="csc">
2002-03-11 15:39:54 -05:00
<xsl:output method="html" />
<xsl:template match="cscpage">
2007-03-18 09:26:06 -04:00
<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">]]>
2002-03-11 15:39:54 -05:00
</xsl:text>
2007-03-18 09:26:06 -04:00
<html xmlns="http://www.w3.org/1999/xhtml">
2002-03-11 15:39:54 -05:00
<head>
<title><xsl:value-of select="@title"/></title>
2002-10-27 21:36:59 -05:00
<link rel="stylesheet" href="/default.css" type="text/css" />
2002-03-11 15:39:54 -05:00
<style type="text/css">
<![CDATA[<!-- @import url('/default.css'); -->]]>
</style>
</head>
2002-10-27 21:11:31 -05:00
<body bgcolor="#ffffff">
2007-03-18 14:24:08 -04:00
<a name="pagetop"></a>
2002-03-11 15:39:54 -05:00
<xsl:apply-templates select="biglogo"/>
<xsl:apply-templates select="header">
2007-03-18 07:53:44 -04:00
<xsl:with-param name="title" select="@title"/>
2002-03-11 15:39:54 -05:00
</xsl:apply-templates>
<xsl:apply-templates select="section|menu"/>
<xsl:apply-templates select="footer"/>
</body>
</html>
</xsl:template>
<xsl:template match="section">
<xsl:if test="@id != ''"><a id="{@id}" /></xsl:if>
2002-03-11 15:39:54 -05:00
<h2><xsl:value-of select="@title"/></h2>
<xsl:apply-templates />
</xsl:template>
2002-04-22 21:02:42 -04:00
<xsl:template match="biglogo" name="biglogo">
2007-04-03 08:40:23 -04:00
<div class="biglogo">
2007-04-03 10:40:36 -04:00
<table cellspacing="0" cellpadding="0" border="0" align="left">
2002-03-11 15:39:54 -05:00
<tr>
2002-04-22 21:02:42 -04:00
<td width="109"><a href="http://www.uwaterloo.ca/"><img
src="/logos/uw_logo_100_68.gif" alt="University of Waterloo"
width="100" height="68" align="center" border="0" /></a></td>
2007-04-03 08:40:23 -04:00
<!--<td width="174"><a href="/"><img src="/logos/csc_160_70.png"
2002-04-22 21:02:42 -04:00
alt="Computer Science Club" width="165" height="75" align="center"
2007-04-03 08:40:23 -04:00
border="0" /></a></td>-->
2002-04-22 21:02:42 -04:00
<td width="91"><a href="http://www.acm.org"><img width="82"
height="103" src="/logos/acm_logo.gif" alt="A Student Chapter of
the ACM" align="center" border="0" /></a></td>
2002-03-11 15:39:54 -05:00
</tr>
</table>
2007-04-03 08:40:23 -04:00
</div>
2002-03-11 15:39:54 -05:00
</xsl:template>
<xsl:template match="mediafile">
2006-08-08 12:53:09 -04:00
<xsl:param name="ext" />
<xsl:param name="pre" />
<a href="{$pre}/files/{@file}{$ext}"><xsl:value-of select="@type" /></a>,
</xsl:template>
<xsl:template match="flvfile">
<script type="text/javascript" src="flash/swfobject.js"></script>
<p id="player1"><a href="http://www.macromedia.com/go/getflashplayer">
Get the Flash Player</a> to see this video using Flash Player.
</p>
<script type="text/javascript">
var s1 = new SWFObject("flash/flvplayer.swf","single","400","300","7");
s1.addParam("allowfullscreen","true");
s1.addVariable("file","http://csclub.uwaterloo.ca/files/<xsl:value-of select="@file" />");
<xsl:if test="@preview">
s1.addVariable("image","<xsl:value-of select="@preview" />");
</xsl:if>
s1.write("player1");
</script>
2006-05-19 22:46:54 -04:00
</xsl:template>
<xsl:template match="mediaitem">
2006-06-21 21:53:00 -04:00
<xsl:document method="html"
href="{translate(concat($root, '/media/', @title , '.html'), ' ', ' ')}">
2007-03-18 09:26:06 -04:00
<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">]]>
2006-06-21 21:53:00 -04:00
</xsl:text>
2007-03-18 09:26:06 -04:00
<html xmlns="http://www.w3.org/1999/xhtml">
2006-06-21 21:53:00 -04:00
<head>
<title><xsl:value-of select="@title"/></title>
<style type="text/css">
<![CDATA[<!-- @import url('/default.css'); -->]]>
</style>
</head>
<body bgcolor="#ffffff">
<xsl:call-template name="header">
<xsl:with-param name="title" select="@title"/>
</xsl:call-template>
<xsl:if test="abstract">
2006-06-21 21:53:00 -04:00
<h2>Abstract</h2>
<p>
<xsl:apply-templates select="abstract"/>
</p>
</xsl:if>
<xsl:if test="flvfile">
<h2>View</h2>
<p>
<xsl:apply-templates select="flvfile">
</xsl:apply-templates>
</p>
</xsl:if>
<xsl:if test="mediafile">
<h2>Download</h2>
<p><strong>
HTTP (web browser):
<xsl:apply-templates select="mediafile">
<xsl:with-param name="ext"></xsl:with-param>
</xsl:apply-templates>
<br/><br/>
BitTorrent:
<xsl:apply-templates select="mediafile" >
<xsl:with-param name="ext">.torrent</xsl:with-param>
</xsl:apply-templates>
</strong></p>
</xsl:if>
<br/>
<!-- Slashdot It link -->
<!-- <a
2007-06-08 13:58:25 -04:00
href="javascript:location.href='http://slashdot.org/bookmark.pl?url='+encodeURIComponent(location.href)"> <img src="http://images.slashdot.org/favicon.gif" alt="Slashdot" border="0" height="16" width="16"></img></a>
<xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
<a href="javascript:location.href='http://slashdot.org/bookmark.pl?url='+encodeURIComponent(location.href)">Slashdot It!</a> -->
<!-- AddThis Bookmark Button -->
<script type="text/javascript">
addthis_url = location.href;
addthis_title = document.title;
addthis_pub = 'calumt';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
<!-- digg button -->
2007-03-23 23:55:56 -04:00
<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>
<script language="javascript" src="http://reddit.com/button.js?t=3"></script>
2007-03-27 14:00:29 -04:00
<!--
2007-03-23 23:55:56 -04:00
<script type="text/javascript">
google_ad_client = "pub-5235744946475097";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
//2007-03-21: mcc
google_ad_channel = "1106187834";
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
2007-03-27 14:00:29 -04:00
-->
2006-06-21 21:53:00 -04:00
<xsl:call-template name="footer"/>
</body>
</html>
</xsl:document>
<li><a href= "{@title}.html"><xsl:value-of select="@title" /></a></li>
2006-05-19 22:46:54 -04:00
</xsl:template>
2002-03-11 15:39:54 -05:00
<xsl:template match="menuitem">
2007-03-18 12:09:33 -04:00
<td align="center" class="menuitem">
2002-03-11 15:39:54 -05:00
<a href="{@href}"><img border="0" src="/buttons/{@icon}.png"
2007-03-27 14:00:29 -04:00
width="40" height="40" alt="{@title}" /><!--</a>--><br />
2007-03-18 11:34:47 -04:00
<!--<a href="{@href}">--><xsl:value-of select="@title"/></a>
2002-03-11 15:39:54 -05:00
</td>
</xsl:template>
<xsl:template match="menudefs">
2007-03-18 11:43:24 -04:00
<div class="menuspace">
2007-03-18 11:48:43 -04:00
<table cellspacing="0" cellpadding="0" border="0" align="center" class="menubar">
2002-03-11 15:39:54 -05:00
<tr>
<xsl:apply-templates select="menuitem"/>
</tr>
</table>
2007-03-18 11:43:24 -04:00
</div>
2002-03-11 15:39:54 -05:00
</xsl:template>
<xsl:template match="menu" name="menu">
<xsl:apply-templates select="document('menu.xml')/menudefs"/>
</xsl:template>
<xsl:template match="header" name="header">
2007-03-18 14:24:08 -04:00
<a name="pagetop"></a>
2007-03-18 13:49:02 -04:00
<div id="vfeed"></div>
2007-03-18 13:22:32 -04:00
<div class="webtitle"><div class="webtitle-inner">
<table cellpadding="0" cellspacing="0" border="0" align="left"><tr>
<td width="90">
2007-03-27 14:00:29 -04:00
<a href="/"><img src="/logos/csc_80_35_white.png" alt="CSC Logo" /></a>
2007-03-18 13:22:32 -04:00
</td><td>
2007-03-27 14:00:29 -04:00
<a href="/"><img src="/logos/csc_title.png" alt="CSC Title" /></a>
2007-03-18 13:49:02 -04:00
</td><td valign="top" align="right">
2007-03-18 13:22:32 -04:00
</td>
</tr></table>
</div></div>
2002-03-11 15:39:54 -05:00
<table cellspacing="0" cellpadding="2" border="0" width="100%"
2007-03-18 10:05:18 -04:00
class="template-header">
2002-03-11 15:39:54 -05:00
<tr>
2007-03-18 12:56:35 -04:00
<!--<td width="84"><a href="/"><img src="/logos/csc_80_35.png"
alt="CSC" width="80" height="35" border="0" /></a></td>-->
2007-05-11 18:56:26 -04:00
<td colspan="2" class="pagetitle"><xsl:value-of select="@title"/></td>
2002-03-11 15:39:54 -05:00
</tr>
<tr>
<td colspan="2">
<xsl:apply-templates
select="document(concat($pwd,'/directory.xml'))/directory"/>
</td>
</tr>
</table>
</xsl:template>
<xsl:template match="directory">
2007-03-18 14:55:48 -04:00
<xsl:if test="@href = ''"><a class="headdir diritem"
href="index.html"><xsl:value-of
select="@title"/></a></xsl:if><xsl:if test="@href != ''">
<a href="{@href}"><xsl:value-of select="@title"/></a></xsl:if>
2002-03-11 15:39:54 -05:00
<xsl:apply-templates match="diritem"/>
</xsl:template>
<xsl:template match="diritem">
2007-03-18 14:48:27 -04:00
<a class="diritem" href="{@href}"><xsl:value-of select="@title"/></a>
2002-03-11 15:39:54 -05:00
</xsl:template>
<xsl:template match="footer" name="footer">
2007-03-18 14:25:16 -04:00
<a href="#pagetop" class="pagetop">Go to top</a>
2007-03-18 13:49:02 -04:00
<div class="footer">
2002-03-11 15:39:54 -05:00
<xsl:call-template name="menu"/>
<p>
This page was generated on <xsl:value-of select="$date"/> at
<xsl:value-of select="$time"/>.
</p>
2007-03-18 14:24:08 -04:00
<p class="infobox">
The overall layout is designed specially for Mozilla-based browsers.
It is also printer-friendly version. Please report any difficulty you
may find, including the version of your browser and your operating system.
</p>
2002-08-10 13:33:12 -04:00
<p>
2007-03-27 14:00:29 -04:00
<a href="/"><img src="/logos/csc_80_35.png" alt="CSC" align="right"/></a>
2004-04-10 04:40:32 -04:00
Copyright
<xsl:text disable-output-escaping="yes">&amp;copy;</xsl:text>
2007-02-02 01:20:03 -05:00
2002<xsl:text disable-output-escaping="yes">&amp;ndash;</xsl:text>2007
2004-04-10 04:40:32 -04:00
Computer Science Club of the University of Waterloo.<br />
KDE Crystal theme icons are copyright
<xsl:text disable-output-escaping="yes">&amp;copy;</xsl:text>
2002 and following years KDE Artists.<br />
2007-06-08 15:11:01 -04:00
Sunflower image is copyright Manan Tuli. Horde image is copyright horde contributors. Both available under the <a href="http://creativecommons.org/licenses/by-sa/2.5/">Creative Commons::Attribution-ShareAlike license</a><br />
2007-06-24 05:10:08 -04:00
Gopher image is copyright Elron6900 (Flickr) and is available under the <a href="http://creativecommons.org/licenses/by-nc/2.0/">Attribution-NonCommercial 2.0</a> license.<br/>
Please direct website comments to the <a
2004-04-10 04:40:32 -04:00
href="mailto:www@csclub.uwaterloo.ca">Webmaster</a>.
2002-03-11 15:39:54 -05:00
</p>
2007-03-18 13:49:02 -04:00
</div>
2002-03-11 15:39:54 -05:00
</xsl:template>
<xsl:template match="newsdefs">
2002-09-18 02:25:33 -04:00
<xsl:apply-templates select="newsitem[csc:term(@date) = csc:term($date)]">
<xsl:sort select="translate(@date, '-', '')"
order="descending"
data-type="number"/>
</xsl:apply-templates>
2002-03-11 15:39:54 -05:00
</xsl:template>
<xsl:template match="newsitem">
<tr>
2002-10-27 21:13:35 -05:00
<td class="newsdate" bgcolor="#eeeeff"><xsl:value-of select="@date"/></td>
2002-10-27 21:16:31 -05:00
<td rowspan="2" valign="top" class="newsitem" bgcolor="white"><xsl:apply-templates/></td>
2002-03-11 15:39:54 -05:00
</tr>
<tr>
2002-10-27 21:13:35 -05:00
<td class="newsauthor" bgcolor="#eeeeff"><xsl:value-of select="@author"/></td>
2002-03-11 15:39:54 -05:00
</tr>
</xsl:template>
<xsl:template match="news" name="news">
<tr>
2002-10-27 21:19:42 -05:00
<th colspan="2" class="news" bgcolor="#aaaaff">
2002-03-11 15:39:54 -05:00
News
</th>
</tr>
<xsl:apply-templates select="document('news.xml')/newsdefs"/>
<tr>
2002-10-27 21:14:54 -05:00
<td class="newsitem" bgcolor="white" colspan="2">
2002-03-11 15:39:54 -05:00
<a href="news/">Older news items</a> are available. Make sure you
2006-06-16 13:43:51 -04:00
check out the <a href="/newsgroup/thread.php?group=uw.csc">uw.csc</a> newsgroup and our
2002-03-11 15:39:54 -05:00
announcement boards on the second and third floor of MC for more
updates.
</td>
</tr>
</xsl:template>
<xsl:template match="events" name="events">
<tr>
2002-10-27 21:18:41 -05:00
<th colspan="2" class="news" bgcolor="#aaaaff">
2007-03-27 14:00:29 -04:00
Upcoming Events <a href="events.ics">ical</a>
2002-03-11 15:39:54 -05:00
</th>
</tr>
<xsl:for-each select="document('events.xml')/eventdefs/eventitem">
<xsl:sort select="translate(@date, '-', '')"
order="ascending"
data-type="number"/>
<xsl:if test="translate(@date, '-', '') &gt;= translate($date, '-', '')">
<tr>
2002-10-27 21:14:54 -05:00
<td class="eventdate" bgcolor="#eeffee"><xsl:value-of select="@date"/></td>
<td rowspan="2" valign="top" class="eventitem" bgcolor="white">
2002-03-11 15:39:54 -05:00
<a href="{translate(concat('/events/', @room, '-', @date, '-', @time, '.html'), ' ', '_')}">
<xsl:value-of select="@title"/>
</a>.
<xsl:value-of select="short"/>
</td>
</tr>
<tr>
2002-10-27 21:14:54 -05:00
<td class="eventroom" bgcolor="#eeffee"><xsl:value-of select="@time"/>,
2002-03-11 15:39:54 -05:00
<xsl:value-of select="@room"/></td>
</tr>
</xsl:if>
</xsl:for-each>
<tr>
2002-10-27 21:17:10 -05:00
<td class="eventitem" bgcolor="white" colspan="2"><a href="events/">Past
2002-03-11 15:39:54 -05:00
events</a> are available.</td>
</tr>
</xsl:template>
<xsl:template match="eventdefs">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="eventitem">
<xsl:document method="html"
href="{translate(concat($root, '/events/', @room, '-', @date, '-', @time, '.html'), ' ', '_')}">
2007-03-18 09:26:06 -04:00
<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">]]>
2002-03-11 15:39:54 -05:00
</xsl:text>
2007-03-18 09:26:06 -04:00
<html xmlns="http://www.w3.org/1999/xhtml">
2002-03-11 15:39:54 -05:00
<head>
<title><xsl:value-of select="@title"/></title>
<style type="text/css">
<![CDATA[<!-- @import url('/default.css'); -->]]>
</style>
</head>
2002-10-27 21:11:31 -05:00
<body bgcolor="#ffffff">
2002-03-11 15:39:54 -05:00
<xsl:call-template name="header">
<xsl:with-param name="title" select="@title"/>
</xsl:call-template>
<p>
Held in <xsl:value-of select="@room"/> at
<xsl:value-of select="@date"/>, <xsl:value-of select="@time"/>.
</p>
<h2>Abstract</h2>
<xsl:apply-templates select="abstract"/>
<xsl:call-template name="footer"/>
</body>
</html>
</xsl:document>
</xsl:template>
<xsl:template match="news-and-events">
<table cellspacing="1" cellpadding="2" bgcolor="black">
<xsl:call-template name="events"/>
2002-09-17 00:08:11 -04:00
<xsl:call-template name="news"/>
2002-03-11 15:39:54 -05:00
</table>
</xsl:template>
<xsl:template match="events-this-term" name="events-by-term">
2007-03-27 14:00:29 -04:00
<p>The events for <xsl:value-of select="csc:term($date)"/> are listed here or grab an <a href="/events.ics">ical</a>.</p>
2002-03-11 15:39:54 -05:00
<xsl:for-each select="document('events.xml')/eventdefs/eventitem">
<xsl:sort select="translate(@date, '-', '')"
order="ascending"
data-type="number"/>
2002-04-15 13:38:13 -04:00
<xsl:if test="csc:term(@date) = csc:term($date)">
<h3><a href="{translate(concat('/events/', @room, '-', @date, '-', @time, '.html'), ' ', '_')}"><xsl:value-of select="@title"/></a></h3>
2002-03-11 15:39:54 -05:00
<p>
<b><xsl:value-of select="@room"/>,
<xsl:value-of select="@date"/>, <xsl:value-of
select="@time"/>: </b>
<xsl:value-of select="short"/>
<a href="{translate(concat('/events/', @room, '-', @date, '-', @time, '.html'), ' ', '_')}">
More information</a>.
</p>
</xsl:if>
</xsl:for-each>
</xsl:template>
2002-09-17 00:08:11 -04:00
<xsl:template match="news-this-term" name="news-by-term">
<p>The news for <xsl:value-of select="csc:term($date)"/> is listed here.</p>
<xsl:for-each select="document('news.xml')/newsdefs/newsitem">
<xsl:sort select="translate(@date, '-', '')"
order="descending"
data-type="number"/>
<xsl:if test="csc:term(@date) = csc:term($date)">
<p>
<b><xsl:value-of select="@date"/>,
<xsl:value-of select="@author"/>: </b> <xsl:apply-templates/>
</p>
</xsl:if>
</xsl:for-each>
</xsl:template>
2002-04-15 18:31:30 -04:00
<xsl:template match="members-this-term">
<p>The members for <xsl:value-of select="csc:term($date)"/> are
2002-09-16 23:26:19 -04:00
listed here. We currently have <xsl:value-of
select="count(document('members.xml')/memberlist/member)"/> members.</p>
2002-04-15 18:31:30 -04:00
<table>
<tr>
<th>Member ID</th>
<th>Name</th>
<th>Program</th>
</tr>
<xsl:for-each select="document('members.xml')/memberlist/member">
<tr>
2002-04-22 21:02:42 -04:00
<xsl:if test="position() mod 2 = 0">
<xsl:attribute name="bgcolor">#cee6ff</xsl:attribute>
</xsl:if>
2002-04-15 18:31:30 -04:00
<td><xsl:value-of select="@id"/></td>
<td><xsl:value-of select="@name"/></td>
<td><xsl:value-of select="@program"/></td>
</tr>
</xsl:for-each>
</table>
</xsl:template>
2002-04-22 21:02:42 -04:00
<xsl:template match="all-books">
<p>The books we currently own include:</p>
<table>
<tr>
<th>Title</th>
<th>Author</th>
</tr>
<xsl:for-each select="document('books.xml')/booklist/book">
<tr>
<xsl:if test="position() mod 2 = 0">
<xsl:attribute name="bgcolor">#cee6ff</xsl:attribute>
</xsl:if>
2002-04-22 23:30:13 -04:00
<td><a href="/office/books/{translate(@isbn, ' ', '_')}.html"><xsl:value-of
2002-04-22 21:02:42 -04:00
select="@title"/><xsl:if test="@edition != ''"> (<xsl:value-of
select="@edition"/>)</xsl:if></a></td>
<td><xsl:value-of select="@author"/></td>
</tr>
<xsl:document method="html" href="{translate(concat($root, '/office/books/', @isbn, '.html'), ' ', '_')}">
2007-03-18 09:26:06 -04:00
<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">]]>
2002-04-22 21:02:42 -04:00
</xsl:text>
2007-03-18 09:26:06 -04:00
<html xmlns="http://www.w3.org/1999/xhtml">
2002-04-22 21:02:42 -04:00
<head>
<title>Book: <xsl:value-of select="@title"/></title>
<style type="text/css">
<![CDATA[<!-- @import url('/default.css'); -->]]>
</style>
</head>
2002-10-27 21:11:31 -05:00
<body bgcolor="#ffffff">
2002-04-22 21:02:42 -04:00
<xsl:call-template name="header">
<xsl:with-param name="title" select="@title"/>
2002-04-22 21:28:50 -04:00
<xsl:with-param name="pwd" select="concat($pwd, '/books')"/>
2002-04-22 21:02:42 -04:00
</xsl:call-template>
<p>
<b>Title: </b> <xsl:value-of select="@title"/><br />
<b>Edition: </b> <xsl:value-of select="@edition"/><br />
<b>ISBN: </b> <xsl:value-of select="@isbn"/><br />
<b>Author: </b> <xsl:value-of select="@author"/><br />
<b>Published: </b> <xsl:value-of select="@published"/><br />
</p>
<xsl:call-template name="footer"/>
</body>
</html>
</xsl:document>
</xsl:for-each>
</table>
</xsl:template>
2002-03-11 15:39:54 -05:00
<xsl:template match="generate-event-files">
<xsl:apply-templates select="document('events.xml')/eventdefs"/>
</xsl:template>
<xsl:key name="eventterm"
match="/eventdefs/eventitem"
use="csc:term(@date)" />
2002-03-11 15:39:54 -05:00
<xsl:template match="old-events">
<xsl:for-each
select="document('events.xml')/eventdefs/eventitem">
<xsl:sort select="translate(@date, '-', '')"
2002-04-15 23:50:34 -04:00
order="descending"
data-type="number"/>
2002-03-11 15:39:54 -05:00
<xsl:if
test="not(preceding-sibling::*[csc:term(@date)=csc:term(current()/@date)]) and not(csc:term(@date) = csc:term($date))">
<p><a href="{translate(concat('old-',
csc:term(@date), '.html'), ' ', '_')}">
<xsl:value-of
select="csc:term(@date)"/></a></p>
<xsl:document method="html" href="{translate(concat($root, '/events/old-', csc:term(@date), '.html'), ' ', '_')}">
2007-03-18 09:26:06 -04:00
<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">]]>
</xsl:text>
2007-03-18 09:26:06 -04:00
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Events for <xsl:value-of select="csc:term(@date)"/></title>
<style type="text/css">
<![CDATA[<!-- @import url('/default.css'); -->]]>
</style>
</head>
2002-10-27 21:11:31 -05:00
<body bgcolor="#ffffff">
<xsl:call-template name="header">
<xsl:with-param name="title" select="concat('Events for ', csc:term(@date))"/>
</xsl:call-template>
<xsl:call-template name="events-by-term">
<xsl:with-param name="date" select="@date"/>
</xsl:call-template>
<xsl:call-template name="footer"/>
</body>
</html>
</xsl:document>
</xsl:if>
</xsl:for-each>
</xsl:template>
2002-09-17 00:08:11 -04:00
<xsl:key name="newsterm"
match="/newsdefs/newsitem"
use="csc:term(@date)" />
<xsl:template match="old-news">
<xsl:for-each
select="document('news.xml')/newsdefs/newsitem">
<xsl:sort select="translate(@date, '-', '')"
order="descending"
data-type="number"/>
<xsl:if
test="not(preceding-sibling::*[csc:term(@date)=csc:term(current()/@date)]) and not(csc:term(@date) = csc:term($date))">
<p><a href="{translate(concat('old-',
csc:term(@date), '.html'), ' ', '_')}">
<xsl:value-of
select="csc:term(@date)"/></a></p>
<xsl:document method="html" href="{translate(concat($root, '/news/old-', csc:term(@date), '.html'), ' ', '_')}">
2007-03-18 09:26:06 -04:00
<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">]]>
2002-09-17 00:08:11 -04:00
</xsl:text>
2007-03-18 09:26:06 -04:00
<html xmlns="http://www.w3.org/1999/xhtml">
2002-09-17 00:08:11 -04:00
<head>
2002-09-17 00:09:07 -04:00
<title>News for <xsl:value-of select="csc:term(@date)"/></title>
2002-09-17 00:08:11 -04:00
<style type="text/css">
<![CDATA[<!-- @import url('/default.css'); -->]]>
</style>
</head>
2002-10-27 21:11:31 -05:00
<body bgcolor="#ffffff">
2002-09-17 00:08:11 -04:00
<xsl:call-template name="header">
<xsl:with-param name="title" select="concat('News for ', csc:term(@date))"/>
</xsl:call-template>
<xsl:call-template name="news-by-term">
<xsl:with-param name="date" select="@date"/>
</xsl:call-template>
<xsl:call-template name="footer"/>
</body>
</html>
</xsl:document>
</xsl:if>
</xsl:for-each>
</xsl:template>
2002-03-11 15:39:54 -05:00
<xsl:template match="execlist">
<h3>Elected positions</h3>
<ul>
<xsl:apply-templates select="exec[@type='elected']"/>
</ul>
<h3>Appointed positions</h3>
<ul>
<xsl:apply-templates select="exec[@type='appointed']"/>
</ul>
</xsl:template>
<xsl:template match="exec">
<li><xsl:value-of select="@name"/> is this term's <b><xsl:value-of
select="@position"/></b>. You can <a
2002-10-05 18:47:13 -04:00
href="mailto:{@userid}@csclub.uwaterloo.ca">e-mail the <xsl:value-of select="@position"/></a><xsl:if
test="not(@href='')"> or <a href="{@href}">visit
<xsl:choose>
<xsl:when test="@sex='male'"> his </xsl:when>
<xsl:when test="@sex='female'"> her </xsl:when>
<xsl:otherwise> his or her </xsl:otherwise>
</xsl:choose>
2002-03-11 15:39:54 -05:00
homepage</a></xsl:if>.
</li>
</xsl:template>
<xsl:template match="*">
<xsl:copy>
<xsl:copy-of select="@*" />
<xsl:apply-templates />
</xsl:copy>
</xsl:template>
</xsl:stylesheet>