#!/bin/sh XT_PATH="/Applications/XT" SAX_PATH="/Applications/XT" XP_PATH="/Applications/XT" XSLT="lgthtml.xsl" if [ -z "$1" ]; then title="Entity documentation index" else title="$1" fi echo echo This script converts all .xml files in the current directory to .html echo files applying the XSLT transformation defined in the $XSLT file echo using the James Clark XT XSLT Java processor. echo echo An index.html file, containing links to all .html documenting files, echo is automatically generated. This file uses the script optional parameter echo value as the title of the index.html file. echo echo converting XML files to HTML... for file in *.xml; do echo " converting" $file name="`expr "$file" : '\(.*\)\.[^./]*$' \| "$file"`" eval java -cp ${XT_PATH}/xt.jar:${SAX_PATH}/sax.jar:${XP_PATH}/xp.jar -Dcom.jclark.xsl.sax.parser=com.jclark.xml.sax.CommentDriver com.jclark.xsl.sax.Driver $file $XSLT $name.html done echo conversion done echo echo generating index file... echo "" > index.html echo "" >> index.html echo "" >> index.html echo "" >> index.html echo " "$title"" >> index.html echo " " >> index.html echo "" >> index.html echo "" >> index.html echo "

"$title"

" >> index.html echo "" >> index.html date="`eval date`" echo "

Generated on "$date"

" >> index.html echo "" >> index.html echo "" >> index.html echo index file generated echo