# psvixercesj: a shell wrapped around Xerces # # Revisions: # 2004-01-26 : CMSMcQ : clean up a bit before putting on the server # 2003-10-11 : CMSMcQ : adjust for Linux # 2003-08 : CMSMcQ : make this program for use in demos and tutorials # XJ is the directory for Xerces Jar files XJ=/usr/local/src/xerces-2_5_0/build CP=$XJ/xercesSamples.jar:$XJ/xercesImpl.jar # SEDCMD: sed command to fix up the document by including namespace decls SEDCMD="s|||" # BROWSER and options: I use Galeon (and I guess I don't actually use the options) BROWSER=/usr/bin/galeon BROWOPT1=--new-window BROWOPT2=--new-tab # where am I and what am I doing here? DIR=`pwd` HERE=file://$DIR XMLOUT=$DIR/$1.psvi.out.xerces.xml XSL=/SGML/Public/CMSMcQ/psvihtml.xsl HTMLOUT=$DIR/$1.psvi.out.xerces.html # Do the work, and filter the output through sed to add the namespace declarations # we need. (I really should get around to reporting that as a bug, shouldn't I?) echo Validating $* ... java -cp $CP sax.Writer -v -s -f -p xni.parser.PSVIParser $* | sed -e "$SEDCMD" > $XMLOUT # Transform the PSVI output into HTML xsltproc $XSL file://$XMLOUT > $HTMLOUT # Open everything in a browser echo Opening $XMLOUT in browser ... $BROWSER file://$XMLOUT file://$HTMLOUT &