Updated member list code.
authorDavid Bartley <dtbartle@csclub.uwaterloo.ca>
Mon, 16 Jul 2007 13:09:19 +0000 (09:09 -0400)
committerDavid Bartley <dtbartle@csclub.uwaterloo.ca>
Mon, 16 Jul 2007 13:09:19 +0000 (09:09 -0400)
Makefile
cscweb.xsl

index 79a0586..3a6b506 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -16,7 +16,7 @@ recurse-cow:
 members.xml:
        echo '<?xml version='\''1.0'\''?>' > $@
        echo '<memberlist>' >> $@
-       ceoquery memberlist | awk -F \| '{ id = $$1; name = $$2; program = $$3; gsub(/&/, "\\&amp;", name); gsub(/&/, "\\&amp;", program); gsub(/"/, "\\&quot;", name); gsub(/"/, "\\&quot;", program); print "<member id=\"" id "\" name=\"" name "\" program=\"" program "\" />"; }' >> $@
+       ceoquery memberlist | sort | awk -F \| '{ name = $$1; program = $$2; userid = $$3; gsub(/&/, "\\&amp;", name); gsub(/&/, "\\&amp;", program); gsub(/"/, "\\&quot;", name); gsub(/"/, "\\&quot;", program); print "<member name=\"" name "\" program=\"" program "\" userid=\"" userid "\" />"; }' >> $@
        echo '</memberlist>' >> $@
 
 books.xml:
index e85fc04..e0f3a1c 100644 (file)
   select="count(document('members.xml')/memberlist/member)"/> members.</p>
   <table>
     <tr>
-      <th>Member ID</th>
       <th>Name</th>
       <th>Program</th>
+      <th>Userid</th>
     </tr>
     <xsl:for-each select="document('members.xml')/memberlist/member">
       <xsl:variable name="class">
         </xsl:choose>
       </xsl:variable>
       <tr class="{$class}">
-           <td><xsl:value-of select="@id"/></td>
         <td><xsl:value-of select="@name"/></td>
         <td><xsl:value-of select="@program"/></td>
+        <td><xsl:value-of select="@userid"/></td>
       </tr>
     </xsl:for-each>
   </table>