Yay, memberlist.

foo
Stefanus Du Toit 21 years ago
parent 909cfb0bc3
commit a79468c9d9
  1. 9
      Makefile
  2. 2
      about/Makefile
  3. 4
      about/members.xml
  4. 9
      csc.dtd
  5. 19
      cscweb.xsl

@ -2,14 +2,21 @@ INPUTS = index.xml
SUBDIRS = about events docs office
# the following two rules are there so cow gets built first.
cow-first: recurse-cow all
cow-first: recurse-cow members.xml all
recurse-cow:
cd cow && $(MAKE) && cd ..
members.xml:
echo '<?xml version='\''1.0'\''?>' > $@
echo '<memberlist>' >> $@
ceoquery memberlist | awk -F \| '{ id = $$1; name = $$2; program = $$3; gsub(/"/, "\\&quot;", name); gsub(/"/, "\\&quot;", program); gsub(/&/, "\\&amp;", name); gsub(/&/, "\\&amp;", program); print "<member id=\"" id "\" name=\"" name "\" program=\"" program "\" />"; }' >> $@
echo '</memberlist>' >> $@
include default.mk
default.mk: default.mk.in
echo 'ROOT = '`pwd` > $@
cat $< >> $@
.PHONY: members.xml

@ -2,3 +2,5 @@ INPUTS = index.xml exec.xml members.xml
include ../default.mk
members.html: ../members.xml

@ -4,8 +4,8 @@
<cscpage title="Membership list">
<header />
<section title="Not yet available.">
The membership list is not yet available. Please check back later.
<section title="Members this term">
<members-this-term />
</section>
<footer />
</cscpage>

@ -30,6 +30,15 @@
title CDATA #REQUIRED>
<!ELEMENT short (#PCDATA)>
<!ELEMENT memberlist (member*)>
<!ELEMENT member EMPTY>
<!ATTLIST member
id CDATA #REQUIRED
name CDATA #REQUIRED
program CDATA #REQUIRED>
<!ELEMENT members-this-term EMPTY>
<!ELEMENT menudefs (menuitem*)>
<!ELEMENT menuitem EMPTY>
<!ATTLIST menuitem

@ -228,6 +228,25 @@
</xsl:for-each>
</xsl:template>
<xsl:template match="members-this-term">
<p>The members for <xsl:value-of select="csc:term($date)"/> are
listed here.</p>
<table>
<tr>
<th>Member ID</th>
<th>Name</th>
<th>Program</th>
</tr>
<xsl:for-each select="document('members.xml')/memberlist/member">
<tr>
<td><xsl:value-of select="@id"/></td>
<td><xsl:value-of select="@name"/></td>
<td><xsl:value-of select="@program"/></td>
</tr>
</xsl:for-each>
</table>
</xsl:template>
<xsl:template match="generate-event-files">
<xsl:apply-templates select="document('events.xml')/eventdefs"/>
</xsl:template>

Loading…
Cancel
Save