Remove unreferenced vfeed.js file
[www/www.git] / xsl / functions.xsl
1 <?xml version='1.0'?>
2
3 <xsl:stylesheet version="2.0"
4     xmlns="http://www.w3.org/1999/xhtml"
5     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
6     xmlns:xs="http://www.w3.org/2001/XMLSchema"
7     xmlns:fn="http://www.w3.org/2005/xpath-functions"
8     xmlns:csc="http://csclub.uwaterloo.ca/xslt">
9
10 <xsl:function name="csc:term" as="xs:string">
11   <xsl:param name="date" />
12   <xsl:variable name="date_year" as="xs:integer">
13     <xsl:analyze-string select="$date" regex="([0-9]+)-[0-9]+-[0-9]+">
14       <xsl:matching-substring>
15         <xsl:value-of select="regex-group(1)" />
16       </xsl:matching-substring>
17     </xsl:analyze-string>
18   </xsl:variable>
19   <xsl:variable name="date_month" as="xs:integer">
20     <xsl:analyze-string select="$date" regex="[0-9]+-([0-9]+)-[0-9]+">
21       <xsl:matching-substring>
22         <xsl:value-of select="regex-group(1)" />
23       </xsl:matching-substring>
24     </xsl:analyze-string>
25   </xsl:variable>
26   <xsl:variable name="term_text">
27     <xsl:choose>
28       <xsl:when test="$date_month ge 1 and $date_month le 4">Winter </xsl:when>
29       <xsl:when test="$date_month ge 5 and $date_month le 8">Spring </xsl:when>
30       <xsl:when test="$date_month ge 9 and $date_month le 12">Fall </xsl:when>
31     </xsl:choose>
32   </xsl:variable>
33   <xsl:value-of select="concat($term_text, $date_year)" />
34 </xsl:function>
35
36 <xsl:template name="inline-ads">
37 <!-- google ads -->
38 <p>
39   <script type="text/javascript">
40     google_ad_client = "pub-5235744946475097";
41     google_ad_width = 728;
42     google_ad_height = 90;
43     google_ad_format = "728x90_as";
44     google_ad_type = "text_image";
45     //2007-03-21: mcc
46     google_ad_channel = "1106187834";
47   </script>
48   <script type="text/javascript"
49       src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
50     <xsl:text> </xsl:text>
51   </script>
52 </p>
53 </xsl:template>
54
55 </xsl:stylesheet>