echo `date --iso-8601=date` >> transform.log
NOW=`tail -1 transform.log`
saxon -o index1.html greene_composite-04.xml avery-26.xsl
saxon -o thmbrps-$NOW.txt greene_composite-04.xml exfiles-05.xsl 2> captypes.txt
# This can take a while; should probably switch on and off as desired
saxon greene_composite-04.xml subjindex-04.xsl
sort captypes.txt | sort | uniq -c | sort -r > capcnts.txt
rm captypes.txt

perl -w postproc.perl index1.html > index.html
cd subs
for FILE in `ls *.html`
do

  perl -w ../postproc.perl $FILE > temp/$FILE

done
cd ..
rm -f subs/*.html
mv subs/temp/*.html subs/