Replace some tabs with spaces and remove trailing whitespace

This commit is contained in:
David Bartley 2007-09-26 02:46:20 -04:00
parent 9576759ed4
commit cc1adb01b6
8 changed files with 70 additions and 72 deletions

View File

@ -13,50 +13,48 @@
<xsl:param name="g_root" required="yes" />
<xsl:template match="//eventdefs">
<xsl:call-template name="atom">
<xsl:with-param name="title">Events</xsl:with-param>
<xsl:with-param name="uuid">006f667f-ecae-483a-8cbc-f0c5084dccb1</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="atom">
<xsl:with-param name="title">Events</xsl:with-param>
<xsl:with-param name="uuid">006f667f-ecae-483a-8cbc-f0c5084dccb1</xsl:with-param>
</xsl:call-template>
</xsl:template>
<xsl:template match="//newsdefs">
<xsl:call-template name="atom">
<xsl:with-param name="title">News</xsl:with-param>
<xsl:with-param name="uuid">bdae3752-0cb7-4932-b176-019076389b54</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="atom">
<xsl:with-param name="title">News</xsl:with-param>
<xsl:with-param name="uuid">bdae3752-0cb7-4932-b176-019076389b54</xsl:with-param>
</xsl:call-template>
</xsl:template>
<xsl:template name="atom">
<xsl:param name="title"/>
<xsl:param name="uuid"/>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>UW Computer Science Club <xsl:value-of select="$title"/></title>
<link href="http://csclub.uwaterloo.ca/{$title}.atom" rel="self"/>
<link href="http://csclub.uwaterloo.ca/"/>
<updated><xsl:value-of select="$g_date"/></updated>
<id>
urn:uuid:<xsl:value-of select="$uuid"/>
</id>
<author>
<name>University of Waterloo Computer Science Club</name>
</author>
<xsl:for-each select="newsitem">
<entry>
<link href="http://csclub.uwaterloo.ca"/>
<summary><xsl:value-of select="."/></summary>
<author><xsl:value-of select="@author"/></author>
</entry>
</xsl:for-each>
<xsl:param name="title"/>
<xsl:param name="uuid"/>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>UW Computer Science Club <xsl:value-of select="$title"/></title>
<link href="http://csclub.uwaterloo.ca/{$title}.atom" rel="self"/>
<link href="http://csclub.uwaterloo.ca/"/>
<updated><xsl:value-of select="$g_date"/></updated>
<id>urn:uuid:<xsl:value-of select="$uuid"/></id>
<author>
<name>University of Waterloo Computer Science Club</name>
</author>
<xsl:for-each select="newsitem">
<entry>
<link href="http://csclub.uwaterloo.ca"/>
<summary><xsl:value-of select="."/></summary>
<author><xsl:value-of select="@author"/></author>
</entry>
</xsl:for-each>
<xsl:for-each select="eventitem">
<entry>
<title><xsl:value-of select="@title"/></title>
<!-- we do a hack here with the translate to get whitespace replacement -->
<link href="{concat('http://csclub.uwaterloo.ca/events/',translate(@room,' ','_'),'-',translate(@date,' ','_'),'-',translate(@time,' ','_'),'.html')}"/>
<author><xsl:value-of select="short"/></author>
<summary><xsl:value-of select="abstract"/></summary>
</entry>
</xsl:for-each>
</feed>
<entry>
<title><xsl:value-of select="@title"/></title>
<!-- we do a hack here with the translate to get whitespace replacement -->
<link href="{concat('http://csclub.uwaterloo.ca/events/',translate(@room,' ','_'),'-',translate(@date,' ','_'),'-',translate(@time,' ','_'),'.html')}"/>
<author><xsl:value-of select="short"/></author>
<summary><xsl:value-of select="abstract"/></summary>
</entry>
</xsl:for-each>
</feed>
</xsl:template>
</xsl:stylesheet>

View File

@ -65,11 +65,11 @@
<div id="vfeed" />
<div class="webtitle">
<div class="csclogo">
<a href="{$pre}"><img src="{$pre}logos/csc_80_35_white.png"
<a href="{$pre}"><img src="{$pre}logos/csc_80_35_white.png"
alt="CSC Logo" /></a>
</div>
<div>
<a href="{$pre}"><img src="{$pre}logos/csc_title.png"
<a href="{$pre}"><img src="{$pre}logos/csc_title.png"
alt="Computer Science Club" /></a>
</div>
</div>
@ -91,12 +91,12 @@
<a href="#pagetop" class="pagetop">Go to top</a>
<div class="infobox">
<p>
This site supports TLS/SSL using a certificate signed by the
This site supports TLS/SSL using a certificate signed by the
"CSC Certificate Authority". Click <a href="{$pre}csclub.pem">here</a>
(PEM format) or <a href="{$pre}csclub.der">here</a> (DER format) to
install the certificate authority into your browser.
</p><p>
This page was generated on <xsl:value-of select="$g_date" /> at
This page was generated on <xsl:value-of select="$g_date" /> at
<xsl:value-of select="$g_time" />.
</p><p>
Copyright
@ -112,7 +112,7 @@
</a>
<a href="http://jigsaw.w3.org/css-validator/check/referer">
<img style="border:0;width:88px;height:31px"
src="http://jigsaw.w3.org/css-validator/images/vcss"
src="http://jigsaw.w3.org/css-validator/images/vcss"
alt="Valid CSS!" />
</a>
</p>

View File

@ -12,12 +12,12 @@
<th colspan="2" class="news">Upcoming Events</th>
</tr>
<xsl:for-each select="document(concat($g_root, '/events.xml'))/eventdefs/eventitem">
<xsl:sort select="translate(@date, '-', '')"
<xsl:sort select="translate(@date, '-', '')"
order="ascending" data-type="number" />
<xsl:if test="translate(@date, '-', '') &gt;= translate($g_date, '-', '')">
<tr>
<td class="eventdate"><xsl:value-of select="@date" /></td>
<td rowspan="2" valign="top" class="eventitem">
<td rowspan="2" valign="top" class="eventitem">
<a href="{translate(concat('/events/', @room, '-', @date, '-', @time, '.html'), ' ', '_')}">
<xsl:value-of select="@title" />
</a>.
@ -50,14 +50,14 @@
<p>The events for <xsl:value-of select="csc:term($date)" /> are listed here.
You can also <a href="{$pre}events.ics">download an ICS</a> of them.</p>
<xsl:for-each select="document(concat($g_root, '/events.xml'))/eventdefs/eventitem">
<xsl:sort select="translate(@date, '-', '')"
<xsl:sort select="translate(@date, '-', '')"
order="ascending" data-type="number" />
<xsl:if test="csc:term(@date) = csc:term($date)">
<h3><a href="{translate(concat($pre, 'events/', @room, '-', @date, '-', @time, '.html'), ' ', '_')}"><xsl:value-of select="@title" /></a></h3>
<p>
<strong>
<xsl:value-of select="@room" />,
<xsl:value-of select="@date" />,
<xsl:value-of select="@room" />,
<xsl:value-of select="@date" />,
<xsl:value-of select="@time" />:
</strong>
<xsl:value-of select="short" />.
@ -71,8 +71,8 @@
</xsl:template>
<xsl:template match="eventitem">
<xsl:result-document method="xml" encoding="ISO-8859-1"
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
<xsl:result-document method="xml" encoding="ISO-8859-1"
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
href="{translate(concat($g_root, '/events/', @room, '-', @date, '-', @time, '.html'), ' ', '_')}">
<html>
@ -87,7 +87,7 @@
<p><xsl:value-of select="@title" />.</p>
<p>
Held in <xsl:value-of select="@room" />, on
<xsl:value-of select="@date" />, at
<xsl:value-of select="@date" />, at
<xsl:value-of select="@time" />.
</p>
</div>
@ -105,14 +105,14 @@
<xsl:template match="old-events">
<xsl:for-each select="document(concat($g_root, '/events.xml'))/eventdefs/eventitem">
<xsl:sort select="translate(@date, '-', '')"
<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($g_date))">
<p><a href="{translate(concat('old-',csc:term(@date), '.html'), ' ', '_')}">
<xsl:value-of select="csc:term(@date)" />
</a></p>
<xsl:result-document method="xml" encoding="ISO-8859-1"
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
<xsl:result-document method="xml" encoding="ISO-8859-1"
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
href="{translate(concat($g_root, '/events/old-', csc:term(@date), '.html'), ' ', '_')}">
<html>

View File

@ -21,11 +21,11 @@
<xsl:template match="exec">
<li>
<xsl:value-of select="@name" /> is this term's <b>
<xsl:value-of select="@position" /></b>. You can <a
href="mailto:{@userid}@csclub.uwaterloo.ca">e-mail the
<xsl:value-of select="@position" /></b>. You can <a
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
or <a href="{@href}">visit
<xsl:choose>
<xsl:when test="@sex='male'"> his </xsl:when>
<xsl:when test="@sex='female'"> her </xsl:when>

View File

@ -10,7 +10,7 @@
<xsl:template match="mediafile">
<xsl:param name="ext" />
<xsl:param name="mirror" />
<a href="{$mirror}{@file}{$ext}"><xsl:value-of select="@type" /></a>,
<a href="{$mirror}{@file}{$ext}"><xsl:value-of select="@type" /></a>,
</xsl:template>
<xsl:template match="flvfile">
@ -39,7 +39,7 @@
<xsl:with-param name="suffix">-uw</xsl:with-param>
<xsl:with-param name="infotext">
<p>
If you are in residence, downloading these files will not count
If you are in residence, downloading these files will not count
against your ResNet quota.
</p>
</xsl:with-param>
@ -55,8 +55,8 @@
<xsl:param name="bittorrent" />
<xsl:param name="ads" />
<xsl:variable name="realurl" select="concat('http://csclub.uwaterloo.ca/media/', fn:encode-for-uri(@title), '.html')" />
<xsl:result-document method="xml" encoding="ISO-8859-1"
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
<xsl:result-document method="xml" encoding="ISO-8859-1"
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
href="{concat($g_root, '/media/', @title, $suffix, '.html')}">
<html>

View File

@ -9,8 +9,8 @@
<xsl:template match="members-this-term">
<p>The members for <xsl:value-of select="csc:term($g_date)" /> are
listed here. We currently have
<xsl:value-of select="count(document(concat($g_root, '/members.xml'))/memberlist/member)" />
listed here. We currently have
<xsl:value-of select="count(document(concat($g_root, '/members.xml'))/memberlist/member)" />
members.</p>
<table>
<tr>

View File

@ -17,7 +17,7 @@
</xsl:choose>
</xsl:variable>
<div class="menuitem">
<a href="{$preabs}{@href}"><img src="{$pre}buttons/{@icon}.png" width="40"
<a href="{$preabs}{@href}"><img src="{$pre}buttons/{@icon}.png" width="40"
height="40" alt="{@title}" /><br /><xsl:value-of select="@title" /></a>
</div>
</xsl:template>

View File

@ -9,7 +9,7 @@
<xsl:template match="newsdefs">
<xsl:apply-templates select="newsitem[csc:term(@date) = csc:term($g_date)]">
<xsl:sort select="translate(@date, '-', '')"
order="descending" data-type="number" />
order="descending" data-type="number" />
</xsl:apply-templates>
</xsl:template>
@ -30,10 +30,10 @@
<xsl:apply-templates select="document(concat($g_root, '/news.xml'))/newsdefs" />
<tr>
<td class="newsitem" colspan="2">
<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
<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
<a href="events.ics">download an ICS</a> of our events.
</td>
</tr>
@ -43,7 +43,7 @@
<xsl:param name="date" />
<p>The news for <xsl:value-of select="csc:term($date)" /> is listed here.</p>
<xsl:for-each select="document(concat($g_root, '/news.xml'))/newsdefs/newsitem">
<xsl:sort select="translate(@date, '-', '')"
<xsl:sort select="translate(@date, '-', '')"
order="descending" data-type="number" />
<xsl:if test="csc:term(@date) = csc:term($date)">
<p>
@ -59,11 +59,11 @@
<xsl:template match="old-news">
<xsl:for-each select="document(concat($g_root, '/news.xml'))/newsdefs/newsitem">
<xsl:sort select="translate(@date, '-', '')"
<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($g_date))">
<p><a href="{translate(concat('old-', csc:term(@date), '.html'), ' ', '_')}">
<xsl:value-of select="csc:term(@date)" />
<p><a href="{translate(concat('old-', csc:term(@date), '.html'), ' ', '_')}">
<xsl:value-of select="csc:term(@date)" />
</a></p>
<xsl:result-document method="xml" encoding="ISO-8859-1"
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"