Prepend some global variables with g_
authorDavid Bartley <dtbartle@csclub.uwaterloo.ca>
Sun, 30 Sep 2007 01:58:00 +0000 (21:58 -0400)
committerDavid Bartley <dtbartle@csclub.uwaterloo.ca>
Sun, 30 Sep 2007 01:58:00 +0000 (21:58 -0400)
cscweb.xsl
xsl/common.xsl
xsl/directory.xsl
xsl/events.xsl
xsl/media.xsl
xsl/menu.xsl
xsl/news.xsl

index 0845e61..e8be211 100644 (file)
 
 <!--
 
-  Set global "pre" variable based on /cscpage/@pre, which represents the 
-  relative path needed to get to the root. If you do not include a "pre" 
+  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"
   attribute on cscpage then the "pre" attribute will default to "../".
 
 -->
-<xsl:variable name="pre">
+<xsl:variable name="g_pre">
  <xsl:choose>
   <xsl:when test="/cscpage/@pre"><xsl:value-of select="/cscpage/@pre" /></xsl:when>
   <xsl:otherwise>../</xsl:otherwise>
@@ -27,8 +27,8 @@
 </xsl:variable>
 
 <!-- mirror variables -->
-<xsl:variable name="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_csc">http://csclub.uwaterloo.ca/files/</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" />
 
index 90ce4a2..584af14 100644 (file)
   <html>
     <head>
       <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" />
-      <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" />
       <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>
     <body><div>
       <a id="pagetop" />
 <xsl:template match="biglogo">
   <div class="biglogo">
     <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>
     </div>
     <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>
     </div>
     <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>
     </div>
   </div>
   <div id="vfeed" />
   <div class="webtitle">
     <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>
     </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>
     </div>
   </div>
@@ -94,9 +94,9 @@
     <div class="infobox">
       <p>
         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.
+        "CSC Certificate Authority". Click <a href="{$g_pre}csclub.pem">
+        here</a> (PEM format) or <a href="{$g_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
         <xsl:value-of select="$g_time" />.
index d44fc9c..2a791f7 100644 (file)
@@ -15,7 +15,7 @@
     </xsl:choose>
   </xsl:variable>
   <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}">
       <xsl:value-of select="@title" />
     </a>
index 0eac86d..32a90db 100644 (file)
 <xsl:template name="events-by-term">
   <xsl:param name="date" />
   <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: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>
+      <h3><a href="{translate(concat($g_pre, 'events/', @room, '-', @date, '-', @time, '.html'), ' ', '_')}"><xsl:value-of select="@title" /></a></h3>
       <p>
         <strong>
           <xsl:value-of select="@room" />,
@@ -78,7 +78,7 @@
     <html>
       <head>
         <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>
       <body><div>
         <xsl:call-template name="header" />
         <html>
           <head>
             <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>
           <body><div>
             <xsl:call-template name="header" />
index 710e717..0e7d935 100644 (file)
@@ -31,7 +31,7 @@
 
 <xsl:template match="mediaitem">
   <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="ads">yes</xsl:with-param>
   </xsl:call-template>
@@ -43,7 +43,7 @@
         against your ResNet quota.
       </p>
     </xsl:with-param>
-    <xsl:with-param name="mirror" select="$mirror_cs" />
+    <xsl:with-param name="mirror" select="$g_mirror_cs" />
   </xsl:call-template>
   <li><a href= "{@title}.html"><xsl:value-of select="@title" /></a></li>
 </xsl:template>
@@ -62,7 +62,7 @@
     <html>
       <head>
         <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>
       <body><div>
         <xsl:call-template name="header">
index 584d1b8..d00421a 100644 (file)
     <xsl:choose>
       <xsl:when test="@absolute = 'true'" />
       <xsl:otherwise>
-        <xsl:value-of select="$pre" />
+        <xsl:value-of select="$g_pre" />
       </xsl:otherwise>
     </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="{$g_pre}buttons/{@icon}.png" width="40"
       height="40" alt="{@title}" /><br /><xsl:value-of select="@title" /></a>
   </div>
 </xsl:template>
index 840996e..e2e9607 100644 (file)
@@ -72,7 +72,7 @@
         <html>
           <head>
             <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>
           <body><div>
             <xsl:call-template name="header" />