Updated member list code.

foo
David Bartley 16 years ago
parent 1880acb27a
commit 46b82e4c97
  1. 2
      Makefile
  2. 4
      cscweb.xsl

@ -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:

@ -432,9 +432,9 @@
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">
@ -444,9 +444,9 @@
</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>

Loading…
Cancel
Save