Added old news

foo
Webmaster 21 years ago
parent 0925c349e2
commit 0795bf14a2
  1. 2
      Makefile
  2. 60
      cscweb.xsl
  3. 3
      news/Makefile
  4. 6
      news/directory.xml
  5. 13
      news/index.xml

@ -1,5 +1,5 @@
INPUTS = index.xml
SUBDIRS = about events docs office
SUBDIRS = about events docs office news
# the following two rules are there so cow gets built first.
cow-first: recurse-cow books.xml members.xml all

@ -213,8 +213,8 @@
<xsl:template match="news-and-events">
<table cellspacing="1" cellpadding="2" bgcolor="black">
<xsl:call-template name="news"/>
<xsl:call-template name="events"/>
<xsl:call-template name="news"/>
</table>
</xsl:template>
@ -238,6 +238,21 @@
</xsl:for-each>
</xsl:template>
<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>
<xsl:template match="members-this-term">
<p>The members for <xsl:value-of select="csc:term($date)"/> are
listed here. We currently have <xsl:value-of
@ -355,6 +370,49 @@
</xsl:for-each>
</xsl:template>
<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'), ' ', '_')}">
<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">]]>
</xsl:text>
<html>
<head>
<title>Events for <xsl:value-of select="csc:term(@date)"/></title>
<style type="text/css">
<![CDATA[<!-- @import url('/default.css'); -->]]>
</style>
</head>
<body>
<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>
<xsl:template match="execlist">
<h3>Elected positions</h3>
<ul>

@ -0,0 +1,3 @@
INPUTS = index.xml
include ../default.mk

@ -0,0 +1,6 @@
<?xml version='1.0'?>
<!DOCTYPE directory SYSTEM "../csc.dtd">
<directory title="Old news">
</directory>

@ -0,0 +1,13 @@
<?xml version='1.0'?>
<!DOCTYPE cscpage SYSTEM "../csc.dtd">
<cscpage title="CSC News">
<header />
<section title="Old news">
<old-news />
</section>
<footer />
</cscpage>
Loading…
Cancel
Save