Replace some tabs with spaces and remove trailing whitespace
This commit is contained in:
parent
9576759ed4
commit
cc1adb01b6
72
xsl/atom.xsl
72
xsl/atom.xsl
|
@ -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>
|
||||
|
|
|
@ -62,8 +62,8 @@
|
|||
<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"
|
||||
|
|
Loading…
Reference in New Issue