2007-07-16 22:27:55 -04:00
|
|
|
<?xml version='1.0'?>
|
|
|
|
|
2007-11-10 00:55:15 -05:00
|
|
|
<xsl:stylesheet version="1.0"
|
2007-08-11 05:24:19 -04:00
|
|
|
xmlns="http://www.w3.org/1999/xhtml"
|
2007-08-11 04:26:38 -04:00
|
|
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
2007-11-10 00:55:15 -05:00
|
|
|
xmlns:csc="http://csclub.uwaterloo.ca/xsltproc">
|
2007-07-16 22:27:55 -04:00
|
|
|
|
|
|
|
<xsl:template match="newsdefs">
|
2007-08-11 04:26:38 -04:00
|
|
|
<xsl:apply-templates select="newsitem[csc:term(@date) = csc:term($g_date)]">
|
|
|
|
<xsl:sort select="translate(@date, '-', '')"
|
2007-09-26 02:46:20 -04:00
|
|
|
order="descending" data-type="number" />
|
2007-07-16 22:27:55 -04:00
|
|
|
</xsl:apply-templates>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template match="newsitem">
|
|
|
|
<tr>
|
|
|
|
<td class="newsdate"><xsl:value-of select="@date" /></td>
|
|
|
|
<td rowspan="2" valign="top" class="newsitem"><xsl:apply-templates/></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="newsauthor"><xsl:value-of select="@author" /></td>
|
|
|
|
</tr>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template match="news" name="news">
|
|
|
|
<tr>
|
|
|
|
<th colspan="2" class="news">News</th>
|
|
|
|
</tr>
|
2007-08-11 04:26:38 -04:00
|
|
|
<xsl:apply-templates select="document(concat($g_root, '/news.xml'))/newsdefs" />
|
2007-07-16 22:27:55 -04:00
|
|
|
<tr>
|
|
|
|
<td class="newsitem" colspan="2">
|
2007-09-26 02:46:20 -04:00
|
|
|
<a href="news/">Older news items</a> are available. Make sure you check
|
|
|
|
out the <a href="/newsgroup/thread.php?group=uw.csc">uw.csc</a>
|
|
|
|
newsgroup and our announcement boards on the second and third floor of
|
|
|
|
MC for more updates. You can also
|
2007-07-16 22:27:55 -04:00
|
|
|
<a href="events.ics">download an ICS</a> of our events.
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</xsl:template>
|
|
|
|
|
2007-08-11 04:26:38 -04:00
|
|
|
<xsl:template name="news-by-term">
|
|
|
|
<xsl:param name="date" />
|
2007-07-16 22:27:55 -04:00
|
|
|
<p>The news for <xsl:value-of select="csc:term($date)" /> is listed here.</p>
|
2007-08-11 04:26:38 -04:00
|
|
|
<xsl:for-each select="document(concat($g_root, '/news.xml'))/newsdefs/newsitem">
|
2007-09-26 02:46:20 -04:00
|
|
|
<xsl:sort select="translate(@date, '-', '')"
|
2007-07-16 22:27:55 -04:00
|
|
|
order="descending" data-type="number" />
|
|
|
|
<xsl:if test="csc:term(@date) = csc:term($date)">
|
|
|
|
<p>
|
|
|
|
<strong>
|
|
|
|
<xsl:value-of select="@date" />,
|
|
|
|
<xsl:value-of select="@author" />:
|
|
|
|
</strong>
|
|
|
|
<xsl:apply-templates/>
|
|
|
|
</p>
|
|
|
|
</xsl:if>
|
|
|
|
</xsl:for-each>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template match="old-news">
|
2007-08-11 04:26:38 -04:00
|
|
|
<xsl:for-each select="document(concat($g_root, '/news.xml'))/newsdefs/newsitem">
|
2007-09-26 02:46:20 -04:00
|
|
|
<xsl:sort select="translate(@date, '-', '')"
|
2007-07-16 22:27:55 -04:00
|
|
|
order="descending" data-type="number" />
|
2007-08-11 04:26:38 -04:00
|
|
|
<xsl:if test="not(preceding-sibling::*[csc:term(@date)=csc:term(current()/@date)]) and not(csc:term(@date) = csc:term($g_date))">
|
2007-09-26 02:46:20 -04:00
|
|
|
<p><a href="{translate(concat('old-', csc:term(@date), '.html'), ' ', '_')}">
|
|
|
|
<xsl:value-of select="csc:term(@date)" />
|
2007-07-16 22:27:55 -04:00
|
|
|
</a></p>
|
2007-11-10 00:55:15 -05:00
|
|
|
<xsl:document method="xml" encoding="ISO-8859-1"
|
2007-10-09 20:04:09 -04:00
|
|
|
doctype-public="-//W3C//DTD XHTML 1.1//EN"
|
|
|
|
doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"
|
2007-10-05 21:55:10 -04:00
|
|
|
href="{translate(concat($g_outdir, 'old-', csc:term(@date), '.html'), ' ', '_')}">
|
2007-07-16 22:27:55 -04:00
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>News for <xsl:value-of select="csc:term(@date)" /></title>
|
2007-09-29 21:58:00 -04:00
|
|
|
<link rel="stylesheet" href="{$g_pre}default.css" type="text/css" />
|
2007-07-16 22:27:55 -04:00
|
|
|
</head>
|
2007-11-21 21:51:13 -05:00
|
|
|
<body><div class="content">
|
2007-08-11 04:26:38 -04:00
|
|
|
<xsl:call-template name="header" />
|
2007-07-16 22:27:55 -04:00
|
|
|
<xsl:call-template name="news-by-term">
|
|
|
|
<xsl:with-param name="date" select="@date" />
|
|
|
|
</xsl:call-template>
|
|
|
|
<xsl:call-template name="footer" />
|
|
|
|
</div></body>
|
|
|
|
</html>
|
2007-11-10 00:55:15 -05:00
|
|
|
</xsl:document>
|
2007-07-16 22:27:55 -04:00
|
|
|
</xsl:if>
|
|
|
|
</xsl:for-each>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
</xsl:stylesheet>
|