From: Michael D. C. <cra...@go...> - 2001-11-07 02:36:02
|
Well I finally found a way to make docbook work for me without having an aneurism. Now I can start doing meaningful work on writing a programmers manual for ZooLib, and hopefully make it much more approachable for all of you. It doesn't come with Slackware, which is the Linux I normally use, and building it from scratch and getting all the dtd's and catalogs and everything installed is just beyond my capacity. But I installed Debian PowerPC on my Macintosh, and happily one can select DocBook as an install option. When one selects the initial packages for installation there is an option for SGML stuff. With a little RTFMing I was able to get psgml working well to type up my first docbook document in Emacs. I could validate it OK. But I had trouble using db2html to format my test document as HTML. I kept getting lots of cryptic errors. I got help from the doc...@li... mailing list and made a small modification to db2html (it's a shell script) that made things work for me. As it stands, db2html will format DocBook SGML documents, which I think is the official standard for what DocBook means. But DocBook XML is in developmet, and is working well, although I don't think it has been ratified as a standard yet. There are a lot of advantages to preparing documents in XML rather than the more general SGML - basically since its easier to parse there is a lot of free software available for manipulating XML documents but not a whole lot for SGML. The following patch, when applied to a copy of /usr/bin/db2html will make it process DocBook XML documents. Keep both versions around and you can process both kinds. What would be a little better is to detect the file extension and do it the right way in just one script: --- db2html Tue Nov 6 22:25:15 2001 +++ mydb2html Tue Nov 6 22:17:03 2001 @@ -4,6 +4,7 @@ DB_STYLESHEET=/usr/lib/sgml/stylesheet/dsssl/docbook/cygnus/cygnus-both.dsl HTML_STYLESHEET=/usr/lib/sgml/stylesheet/css/cygnus/docbook.css ADMON_GRAPHICS=/usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh/images/*.gif +XMLDCL=/usr/lib/sgml/sgml/xml.dcl output=db2html-dir TMPDIR=DBTOHTML_OUTPUT_DIR$$ @@ -52,10 +53,10 @@ SAVE_PWD=`pwd` if [ $1 = `basename $1` ]; then echo "working on ../$1" - (cd $TMPDIR; jade -c $CATALOG -t sgml -ihtml -d ${DB_STYLESHEET}\#html ../$1; cd $SAVE_PWD) + (cd $TMPDIR; jade -c $CATALOG -t xml -ihtml -d ${DB_STYLESHEET}\#html ${XMLDC L} ../$1; cd $SAVE_PWD) else echo "working on $1" - (cd $TMPDIR; jade -c $CATALOG -t sgml -ihtml -d ${DB_STYLESHEET}\#html $1; cd $SAVE_PWD) + (cd $TMPDIR; jade -c $CATALOG -t xml -ihtml -d ${DB_STYLESHEET}\#html ${XMLDC L} $1; cd $SAVE_PWD) fi if [ $# -eq 1 ] Mike -- Michael D. Crawford GoingWare Inc. - Expert Software Development and Consulting http://www.goingware.com cra...@go... Tilting at Windmills for a Better Tomorrow. "I give you this one rule of conduct. Do what you will, but speak out always. Be shunned, be hated, be ridiculed, be scared, be in doubt, but don't be gagged." -- John J. Chapman, "Make a Bonfire of Your Reputations" http://www.goingware.com/reputation/ |