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

View File

@ -65,11 +65,11 @@
<div id="vfeed" /> <div id="vfeed" />
<div class="webtitle"> <div class="webtitle">
<div class="csclogo"> <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> alt="CSC Logo" /></a>
</div> </div>
<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> alt="Computer Science Club" /></a>
</div> </div>
</div> </div>
@ -91,12 +91,12 @@
<a href="#pagetop" class="pagetop">Go to top</a> <a href="#pagetop" class="pagetop">Go to top</a>
<div class="infobox"> <div class="infobox">
<p> <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> "CSC Certificate Authority". Click <a href="{$pre}csclub.pem">here</a>
(PEM format) or <a href="{$pre}csclub.der">here</a> (DER format) to (PEM format) or <a href="{$pre}csclub.der">here</a> (DER format) to
install the certificate authority into your browser. install the certificate authority into your browser.
</p><p> </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" />. <xsl:value-of select="$g_time" />.
</p><p> </p><p>
Copyright Copyright
@ -112,7 +112,7 @@
</a> </a>
<a href="http://jigsaw.w3.org/css-validator/check/referer"> <a href="http://jigsaw.w3.org/css-validator/check/referer">
<img style="border:0;width:88px;height:31px" <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!" /> alt="Valid CSS!" />
</a> </a>
</p> </p>

View File

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

View File

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

View File

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

View File

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

View File

@ -17,7 +17,7 @@
</xsl:choose> </xsl:choose>
</xsl:variable> </xsl:variable>
<div class="menuitem"> <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> height="40" alt="{@title}" /><br /><xsl:value-of select="@title" /></a>
</div> </div>
</xsl:template> </xsl:template>

View File

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