Fixed xmlns="" garbage.
[mspang/www.git] / xsl / common.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:csc="http://www.csclub.uwaterloo.ca/xslt">
8
9 <xsl:template match="cscpage">
10   <html>
11     <head>
12       <title><xsl:value-of select="@title" /></title>
13       <link rel="stylesheet" href="{$pre}default.css" type="text/css" />
14     </head>
15     <body><div>
16       <a name="pagetop" id="pagetop" />
17       <xsl:apply-templates select="biglogo" />
18       <xsl:apply-templates select="header">
19         <xsl:with-param name="title" select="@title" />
20       </xsl:apply-templates>
21       <xsl:apply-templates select="section|menu" />
22       <xsl:apply-templates select="footer" />
23     </div></body>
24   </html>
25 </xsl:template>
26
27 <xsl:template match="section">
28   <xsl:if test="@id != ''">
29     <a id="{@id}" />
30   </xsl:if>
31   <h2><xsl:value-of select="@title" /></h2>
32   <xsl:apply-templates />
33 </xsl:template>
34
35 <xsl:template match="biglogo" name="biglogo">
36   <div class="biglogo">
37     <div class="uwlogo">
38       <a href="http://www.uwaterloo.ca/"><img src="{$pre}logos/uw_logo.gif"
39           alt="University of Waterloo" width="105" height="70" /></a>
40     </div>
41     <div class="acmlogo">
42       <a href="http://www.acm.org"><img src="{$pre}logos/acm_logo.gif"
43            alt="A Student Chapter of the ACM" width="82" height="88" /></a>
44     </div>
45   </div>
46 </xsl:template>
47
48 <xsl:template match="header" name="header">
49   <div id="vfeed" />
50   <div class="webtitle">
51     <div class="csclogo">
52       <a href="{$pre}"><img src="{$pre}logos/csc_80_35_white.png" 
53           alt="CSC Logo" /></a>
54     </div>
55     <div>
56       <a href="{$pre}"><img src="{$pre}logos/csc_title.png" 
57           alt="Computer Science Club" /></a>
58     </div>
59   </div>
60   <div class="template-header">
61     <xsl:apply-templates
62         select="document(concat($g_pwd, '/directory.xml'))/directory"/>
63   </div>
64 </xsl:template>
65
66 <xsl:template match="footer" name="footer">
67   <a href="#pagetop" class="pagetop">Go to top</a>
68   <div class="footer">
69   <xsl:call-template name="menu" />
70   <p>This page was generated on <xsl:value-of select="$g_date" /> at 
71     <xsl:value-of select="$g_time" />.</p>
72   <p class="infobox">
73     The overall layout is designed specially for modern browsers. If you
74     experience any problems, please report them, along with the version of
75     your browser and operating system, to the 
76     <a href="mailto:www@csclub.uwaterloo.ca">Webmaster</a>.
77   </p>
78   <p>
79     <a href="http://validator.w3.org/check?uri=referer">
80     <img src="http://www.w3.org/Icons/valid-xhtml10"
81         alt="Valid XHTML 1.0 Strict" height="31" width="88" />
82     </a>
83     <a href="http://jigsaw.w3.org/css-validator/check/referer">
84       <img style="border:0;width:88px;height:31px"
85           src="http://jigsaw.w3.org/css-validator/images/vcss" 
86           alt="Valid CSS!" />
87     </a>
88   </p>
89   <div class="footerlogo"><a href="{$pre}"><img src=
90       "{$pre}logos/csc_80_35.png" alt="CSC" /></a></div>
91     <p>
92       Copyright
93       <xsl:text disable-output-escaping="yes">&amp;copy;</xsl:text>
94       2002<xsl:text disable-output-escaping="yes">&amp;ndash;</xsl:text>2007
95       Computer Science Club of the University of Waterloo.<br />
96       KDE Crystal theme icons are copyright
97       <xsl:text disable-output-escaping="yes">&amp;copy;</xsl:text>
98       2002 and following years KDE Artists. Sunflower image is copyright Manan 
99       Tuli. Horde image is copyright horde contributors. Both are available 
100       under the <a href="http://creativecommons.org/licenses/by-sa/2.5/">
101       Creative Commons::Attribution-ShareAlike license</a>. Gopher image is 
102       copyright Elron6900 (Flickr) and is available under the <a
103       href="http://creativecommons.org/licenses/by-nc/2.0/">
104       Attribution-NonCommercial 2.0</a> license.
105     </p>
106   </div>
107 </xsl:template>
108
109 <xsl:template match="news-and-events">
110   <table cellspacing="1" cellpadding="2" class="newsandevents">
111     <xsl:call-template name="events" />
112     <xsl:call-template name="news" />
113  </table>
114 </xsl:template>
115
116 </xsl:stylesheet>