2007-07-16 22:27:55 -04:00
|
|
|
<?xml version='1.0'?>
|
|
|
|
|
2007-08-11 04:26:38 -04:00
|
|
|
<xsl:stylesheet version="2.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"
|
|
|
|
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
2007-08-12 16:06:22 -04:00
|
|
|
xmlns:fn="http://www.w3.org/2005/xpath-functions"
|
2007-08-11 04:26:38 -04:00
|
|
|
xmlns:csc="http://www.csclub.uwaterloo.ca/xslt">
|
2007-07-16 22:27:55 -04:00
|
|
|
|
|
|
|
<xsl:template match="mediafile">
|
|
|
|
<xsl:param name="ext" />
|
2007-08-10 14:27:57 -04:00
|
|
|
<xsl:param name="mirror" />
|
|
|
|
<a href="{$mirror}{@file}{$ext}"><xsl:value-of select="@type" /></a>,
|
2007-07-16 22:27:55 -04:00
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template match="flvfile">
|
2007-08-10 14:27:57 -04:00
|
|
|
<xsl:param name="mirror" />
|
2007-08-11 04:26:38 -04:00
|
|
|
<script type="text/javascript" src="flash/swfobject.js"><xsl:text> </xsl:text></script>
|
2007-07-16 22:27:55 -04:00
|
|
|
<p id="player1"><a href="http://www.macromedia.com/go/getflashplayer">
|
|
|
|
Get the Flash Player</a> to see this video using Flash Player.</p>
|
|
|
|
<script type="text/javascript">
|
|
|
|
var s1 = new SWFObject("flash/flvplayer.swf","single","400","300","7");
|
|
|
|
s1.addParam("allowfullscreen","true");
|
2007-08-10 14:27:57 -04:00
|
|
|
s1.addVariable("file","<xsl:value-of select="$mirror" /><xsl:value-of select="@file" />");
|
2007-07-16 22:27:55 -04:00
|
|
|
<xsl:if test="@preview">
|
|
|
|
s1.addVariable("image","http://csclub.uwaterloo.ca/files/<xsl:value-of select="@preview" />");
|
|
|
|
</xsl:if>
|
|
|
|
s1.write("player1");
|
|
|
|
</script>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template match="mediaitem">
|
2007-08-11 21:55:47 -04:00
|
|
|
<xsl:call-template name="makemediaitem">
|
|
|
|
<xsl:with-param name="mirror" select="$mirror_csc" />
|
2007-08-11 22:16:27 -04:00
|
|
|
<xsl:with-param name="bittorrent">yes</xsl:with-param>
|
2007-08-11 21:55:47 -04:00
|
|
|
</xsl:call-template>
|
|
|
|
<xsl:call-template name="makemediaitem">
|
|
|
|
<xsl:with-param name="suffix">-uw</xsl:with-param>
|
|
|
|
<xsl:with-param name="infotext">
|
2007-08-11 22:16:27 -04:00
|
|
|
<p>
|
|
|
|
If you are in residence, downloading these files will not count
|
|
|
|
against your ResNet quota.
|
|
|
|
</p>
|
2007-08-11 21:55:47 -04:00
|
|
|
</xsl:with-param>
|
|
|
|
<xsl:with-param name="mirror" select="$mirror_cs" />
|
|
|
|
</xsl:call-template>
|
2007-08-11 22:16:27 -04:00
|
|
|
<li><a href= "{@title}.html"><xsl:value-of select="@title" /></a></li>
|
2007-08-11 21:55:47 -04:00
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template name="makemediaitem">
|
|
|
|
<xsl:param name="suffix" />
|
|
|
|
<xsl:param name="infotext" />
|
|
|
|
<xsl:param name="mirror" />
|
|
|
|
<xsl:param name="bittorrent" />
|
2007-08-12 16:27:28 -04:00
|
|
|
<xsl:variable name="realurl" select="concat('http://csclub.uwaterloo.ca/media/', fn:encode-for-uri(@title), '.html')" />
|
2007-08-11 04:26:38 -04:00
|
|
|
<xsl:result-document method="xml" encoding="ISO-8859-1"
|
2007-07-16 22:27:55 -04:00
|
|
|
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
|
|
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
|
2007-08-12 16:06:22 -04:00
|
|
|
href="{concat($g_root, '/media/', @title, $suffix, '.html')}">
|
2007-07-16 22:27:55 -04:00
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title><xsl:value-of select="@title" /></title>
|
|
|
|
<link rel="stylesheet" href="{$pre}default.css" type="text/css" />
|
|
|
|
</head>
|
|
|
|
<body><div>
|
2007-08-11 04:26:38 -04:00
|
|
|
<xsl:call-template name="header" />
|
2007-07-16 22:27:55 -04:00
|
|
|
<xsl:if test="abstract">
|
|
|
|
<h2>Abstract</h2>
|
|
|
|
<div>
|
|
|
|
<xsl:apply-templates select="abstract/node()" />
|
|
|
|
</div>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="flvfile">
|
|
|
|
<h2>View</h2>
|
|
|
|
<div>
|
2007-08-11 21:55:47 -04:00
|
|
|
<xsl:apply-templates select="flvfile">
|
|
|
|
<xsl:with-param name="mirror" select="$mirror" />
|
|
|
|
</xsl:apply-templates>
|
2007-07-16 22:27:55 -04:00
|
|
|
</div>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="mediafile">
|
|
|
|
<h2>Download</h2>
|
2007-08-12 18:51:16 -04:00
|
|
|
<div>
|
2007-08-11 22:16:27 -04:00
|
|
|
<xsl:copy-of select="$infotext" />
|
|
|
|
<xsl:if test="$bittorrent = 'yes'">
|
2007-08-12 18:51:16 -04:00
|
|
|
<p class="mediafile">
|
2007-08-12 18:32:23 -04:00
|
|
|
BitTorrent:
|
|
|
|
<xsl:apply-templates select="mediafile">
|
|
|
|
<xsl:with-param name="ext">.torrent</xsl:with-param>
|
|
|
|
<xsl:with-param name="mirror" select="$mirror" />
|
|
|
|
</xsl:apply-templates>
|
|
|
|
</p>
|
2007-08-11 21:55:47 -04:00
|
|
|
</xsl:if>
|
2007-08-14 01:51:27 -04:00
|
|
|
<p class="mediafile">
|
|
|
|
HTTP (web browser):
|
|
|
|
<xsl:apply-templates select="mediafile">
|
|
|
|
<xsl:with-param name="mirror" select="$mirror" />
|
|
|
|
</xsl:apply-templates>
|
|
|
|
</p>
|
2007-08-12 18:51:16 -04:00
|
|
|
</div>
|
2007-07-16 22:27:55 -04:00
|
|
|
</xsl:if>
|
2007-08-12 16:06:22 -04:00
|
|
|
<xsl:if test="@buttons = 'yes'">
|
2007-08-12 18:32:23 -04:00
|
|
|
<p>
|
|
|
|
<!-- digg button -->
|
|
|
|
<script type="text/javascript">
|
|
|
|
digg_url = '<xsl:value-of select="$realurl" />';
|
|
|
|
</script>
|
|
|
|
<script src="http://digg.com/tools/diggthis.js"
|
|
|
|
type="text/javascript">
|
|
|
|
<xsl:text> </xsl:text>
|
|
|
|
</script>
|
|
|
|
<!-- reddit button -->
|
|
|
|
<script type="text/javascript">
|
|
|
|
reddit_url = '<xsl:value-of select="$realurl" />';
|
|
|
|
reddit_title = '<xsl:value-of select="fn:encode-for-uri(@title)" />';
|
|
|
|
</script>
|
|
|
|
<script src="http://reddit.com/button.js?t=3"
|
|
|
|
type="text/javascript">
|
|
|
|
<xsl:text> </xsl:text>
|
|
|
|
</script>
|
|
|
|
</p>
|
2007-07-16 22:27:55 -04:00
|
|
|
</xsl:if>
|
2007-07-20 03:27:01 -04:00
|
|
|
<xsl:if test="other">
|
|
|
|
<div>
|
|
|
|
<xsl:copy-of select="other/node()"/>
|
|
|
|
</div>
|
|
|
|
</xsl:if>
|
2007-08-12 18:32:23 -04:00
|
|
|
<p>
|
|
|
|
<!-- AddThis Bookmark Button -->
|
|
|
|
<script type="text/javascript">
|
|
|
|
addthis_url = '<xsl:value-of select="$realurl" />';
|
|
|
|
addthis_title = document.title;
|
|
|
|
addthis_pub = 'calumt';
|
|
|
|
</script>
|
|
|
|
<script type="text/javascript"
|
|
|
|
src="http://s7.addthis.com/js/addthis_widget.php?v=12">
|
|
|
|
<xsl:text> </xsl:text>
|
|
|
|
</script>
|
|
|
|
</p>
|
2007-07-16 22:27:55 -04:00
|
|
|
<!-- google ads -->
|
|
|
|
<!--
|
2007-08-12 18:32:23 -04:00
|
|
|
<p>
|
|
|
|
<script type="text/javascript">
|
|
|
|
google_ad_client = "pub-5235744946475097";
|
|
|
|
google_ad_width = 728;
|
|
|
|
google_ad_height = 90;
|
|
|
|
google_ad_format = "728x90_as";
|
|
|
|
google_ad_type = "text_image";
|
|
|
|
//2007-03-21: mcc
|
|
|
|
google_ad_channel = "1106187834";
|
|
|
|
</script>
|
|
|
|
<script type="text/javascript"
|
|
|
|
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
|
|
|
|
<xsl:text> </xsl:text>
|
|
|
|
</script>
|
|
|
|
</p>
|
2007-07-16 22:27:55 -04:00
|
|
|
-->
|
|
|
|
<xsl:call-template name="footer" />
|
|
|
|
</div></body>
|
|
|
|
</html>
|
2007-08-11 04:26:38 -04:00
|
|
|
</xsl:result-document>
|
2007-07-16 22:27:55 -04:00
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
</xsl:stylesheet>
|