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