Reflowed and split cscweb.xsl into smaller xsl files.
[www/www.git] / xsl / members.xsl
1 <?xml version='1.0'?>
2
3 <xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4     xmlns:csc="http://www.csclub.uwaterloo.ca/cow" 
5     extension-element-prefixes="csc">
6
7 <xsl:template match="members-this-term">
8   <p>The members for <xsl:value-of select="csc:term($date)" /> are
9     listed here. We currently have 
10     <xsl:value-of select="count(document('../members.xml')/memberlist/member)" /> 
11     members.</p>
12   <table>
13     <tr>
14       <th>Name</th>
15       <th>Program</th>
16       <th>Userid</th>
17     </tr>
18     <xsl:for-each select="document('../members.xml')/memberlist/member">
19       <xsl:variable name="class">
20         <xsl:choose>
21           <xsl:when test="position() mod 2 = 0">members1</xsl:when>
22           <xsl:otherwise>members2</xsl:otherwise>
23         </xsl:choose>
24       </xsl:variable>
25       <tr class="{$class}">
26         <td><xsl:value-of select="@name" /></td>
27         <td><xsl:value-of select="@program" /></td>
28         <td><xsl:value-of select="@userid" /></td>
29       </tr>
30     </xsl:for-each>
31   </table>
32 </xsl:template>
33
34 </xsl:stylesheet>