Prepend some global variables with g_

This commit is contained in:
David Bartley 2007-09-29 21:58:00 -04:00
parent 583ad2ffe7
commit 262bbed146
7 changed files with 27 additions and 27 deletions

View File

@ -14,12 +14,12 @@
<!-- <!--
Set global "pre" variable based on /cscpage/@pre, which represents the Set global "g_pre" variable based on /cscpage/@pre, which represents the
relative path needed to get to the root. If you do not include a "pre" relative path needed to get to the root. If you do not include a "pre"
attribute on cscpage then the "pre" attribute will default to "../". attribute on cscpage then the "pre" attribute will default to "../".
--> -->
<xsl:variable name="pre"> <xsl:variable name="g_pre">
<xsl:choose> <xsl:choose>
<xsl:when test="/cscpage/@pre"><xsl:value-of select="/cscpage/@pre" /></xsl:when> <xsl:when test="/cscpage/@pre"><xsl:value-of select="/cscpage/@pre" /></xsl:when>
<xsl:otherwise>../</xsl:otherwise> <xsl:otherwise>../</xsl:otherwise>
@ -27,8 +27,8 @@
</xsl:variable> </xsl:variable>
<!-- mirror variables --> <!-- mirror variables -->
<xsl:variable name="mirror_csc">http://csclub.uwaterloo.ca/files/</xsl:variable> <xsl:variable name="g_mirror_csc">http://csclub.uwaterloo.ca/files/</xsl:variable>
<xsl:variable name="mirror_cs">http://mirror.cs.uwaterloo.ca/csclub/</xsl:variable> <xsl:variable name="g_mirror_cs">http://mirror.cs.uwaterloo.ca/csclub/</xsl:variable>
<xsl:output 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" /> <xsl:output 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" />

View File

@ -11,12 +11,12 @@
<html> <html>
<head> <head>
<link rel="shortcut icon" href="/favicon.ico" /> <link rel="shortcut icon" href="/favicon.ico" />
<link rel="alternate" title="CSC Events Feed" href="{$pre}events.atom" <link rel="alternate" title="CSC Events Feed" href="{$g_pre}events.atom"
type="application/rss+xml" /> type="application/rss+xml" />
<link rel="alternate" title="CSC News Feed" href="{$pre}news.atom" <link rel="alternate" title="CSC News Feed" href="{$g_pre}news.atom"
type="application/rss+xml" /> type="application/rss+xml" />
<title><xsl:value-of select="@title" /></title> <title><xsl:value-of select="@title" /></title>
<link rel="stylesheet" href="{$pre}default.css" type="text/css" /> <link rel="stylesheet" href="{$g_pre}default.css" type="text/css" />
</head> </head>
<body><div> <body><div>
<a id="pagetop" /> <a id="pagetop" />
@ -39,15 +39,15 @@
<xsl:template match="biglogo"> <xsl:template match="biglogo">
<div class="biglogo"> <div class="biglogo">
<div class="uwlogo"> <div class="uwlogo">
<a href="http://www.uwaterloo.ca/"><img src="{$pre}logos/uw_logo.gif" <a href="http://www.uwaterloo.ca/"><img src="{$g_pre}logos/uw_logo.gif"
alt="University of Waterloo" width="105" height="70" /></a> alt="University of Waterloo" width="105" height="70" /></a>
</div> </div>
<div class="acmlogo"> <div class="acmlogo">
<a href="http://www.acm.org"><img src="{$pre}logos/acm_logo.gif" <a href="http://www.acm.org"><img src="{$g_pre}logos/acm_logo.gif"
alt="A Student Chapter of the ACM" width="82" height="88" /></a> alt="A Student Chapter of the ACM" width="82" height="88" /></a>
</div> </div>
<div class="csclogo"> <div class="csclogo">
<a href="{$pre}index.html"><img src="{$pre}logos/csc_logo.gif" <a href="{$g_pre}index.html"><img src="{$g_pre}logos/csc_logo.gif"
alt="University of Waterloo" width="420" height="79" /></a> alt="University of Waterloo" width="420" height="79" /></a>
</div> </div>
</div> </div>
@ -67,11 +67,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="{$g_pre}"><img src="{$g_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="{$g_pre}"><img src="{$g_pre}logos/csc_title.png"
alt="Computer Science Club" /></a> alt="Computer Science Club" /></a>
</div> </div>
</div> </div>
@ -94,9 +94,9 @@
<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="{$g_pre}csclub.pem">
(PEM format) or <a href="{$pre}csclub.der">here</a> (DER format) to here</a> (PEM format) or <a href="{$g_pre}csclub.der">here</a> (DER
install the certificate authority into your browser. format) to 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" />.

View File

@ -15,7 +15,7 @@
</xsl:choose> </xsl:choose>
</xsl:variable> </xsl:variable>
<xsl:if test="@title"> <xsl:if test="@title">
<a class="diritem homedir" href="{$pre}">Home</a> <a class="diritem homedir" href="{$g_pre}">Home</a>
<a class="diritem" href="{$href}"> <a class="diritem" href="{$href}">
<xsl:value-of select="@title" /> <xsl:value-of select="@title" />
</a> </a>

View File

@ -48,12 +48,12 @@
<xsl:template name="events-by-term"> <xsl:template name="events-by-term">
<xsl:param name="date" /> <xsl:param name="date" />
<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="{$g_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($g_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" />,
@ -78,7 +78,7 @@
<html> <html>
<head> <head>
<title><xsl:value-of select="@title" /></title> <title><xsl:value-of select="@title" /></title>
<link rel="stylesheet" href="{$pre}default.css" type="text/css" /> <link rel="stylesheet" href="{$g_pre}default.css" type="text/css" />
</head> </head>
<body><div> <body><div>
<xsl:call-template name="header" /> <xsl:call-template name="header" />
@ -118,7 +118,7 @@
<html> <html>
<head> <head>
<title>Events for <xsl:value-of select="csc:term(@date)" /></title> <title>Events for <xsl:value-of select="csc:term(@date)" /></title>
<link rel="stylesheet" href="{$pre}default.css" type="text/css" /> <link rel="stylesheet" href="{$g_pre}default.css" type="text/css" />
</head> </head>
<body><div> <body><div>
<xsl:call-template name="header" /> <xsl:call-template name="header" />

View File

@ -31,7 +31,7 @@
<xsl:template match="mediaitem"> <xsl:template match="mediaitem">
<xsl:call-template name="makemediaitem"> <xsl:call-template name="makemediaitem">
<xsl:with-param name="mirror" select="$mirror_csc" /> <xsl:with-param name="mirror" select="$g_mirror_csc" />
<xsl:with-param name="bittorrent">yes</xsl:with-param> <xsl:with-param name="bittorrent">yes</xsl:with-param>
<xsl:with-param name="ads">yes</xsl:with-param> <xsl:with-param name="ads">yes</xsl:with-param>
</xsl:call-template> </xsl:call-template>
@ -43,7 +43,7 @@
against your ResNet quota. against your ResNet quota.
</p> </p>
</xsl:with-param> </xsl:with-param>
<xsl:with-param name="mirror" select="$mirror_cs" /> <xsl:with-param name="mirror" select="$g_mirror_cs" />
</xsl:call-template> </xsl:call-template>
<li><a href= "{@title}.html"><xsl:value-of select="@title" /></a></li> <li><a href= "{@title}.html"><xsl:value-of select="@title" /></a></li>
</xsl:template> </xsl:template>
@ -62,7 +62,7 @@
<html> <html>
<head> <head>
<title><xsl:value-of select="@title" /></title> <title><xsl:value-of select="@title" /></title>
<link rel="stylesheet" href="{$pre}default.css" type="text/css" /> <link rel="stylesheet" href="{$g_pre}default.css" type="text/css" />
</head> </head>
<body><div> <body><div>
<xsl:call-template name="header"> <xsl:call-template name="header">

View File

@ -12,12 +12,12 @@
<xsl:choose> <xsl:choose>
<xsl:when test="@absolute = 'true'" /> <xsl:when test="@absolute = 'true'" />
<xsl:otherwise> <xsl:otherwise>
<xsl:value-of select="$pre" /> <xsl:value-of select="$g_pre" />
</xsl:otherwise> </xsl:otherwise>
</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="{$g_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

@ -72,7 +72,7 @@
<html> <html>
<head> <head>
<title>News for <xsl:value-of select="csc:term(@date)" /></title> <title>News for <xsl:value-of select="csc:term(@date)" /></title>
<link rel="stylesheet" href="{$pre}default.css" type="text/css" /> <link rel="stylesheet" href="{$g_pre}default.css" type="text/css" />
</head> </head>
<body><div> <body><div>
<xsl:call-template name="header" /> <xsl:call-template name="header" />