# Description: # This script is designed to transform a text document written in DocBook XML # which contains mainly an FAQ list into an HTML file. Most of the real work is done by the 'xsltproc' program # and by the Norman walsh XSL style-sheets for DocBook XML. # # Example: # if the script is one your path: # docbook2html-faq.sh SomeDocBookFile.xml > SomeHtmlFile.html # # or if the script isn't on you path # ./docbook2html-faq.sh SomeDocBookFile.xml > SomeHtmlFile.html # # URLs: # # http://www.docbook.org/ # The home page for the DocBook XML dtd or schema # # http://www.ella-associates.org/utils/ # A list of text transformation scripts # # Notes: # The Normal Walsh XSL stylesheet for Docbook XML seem to use CSS 'classes' to # surround the question and answer tags but have no style sheet link to # format them. This script adds some simple CSS styles to make the FAQ look # a bit better # # This script forms part of a 'suite' of text transformation scripts such as # docbook2html.sh # plaintext2docbook.sh # plaintext2html.sh # lindoc2html.sh # # When I say 'plain text' I actually mean a text document written in a # kind of 'minimal markup language', although if no markup is present most # of these scripts will still do something useful. # # Author: # m bishop # if [ "$1" = "" ] then echo "usage: $0 SomeDocBookXMLfile.xml " cat $0 | sed -n "/^[ ]*#[^\-]/p" exit 1; fi HTMLXSLPATH="/var/docbook-xsl/html" xsltproc $HTMLXSLPATH/docbook.xsl $1 | \ sed "s/<\/head>/ \ <style> \ .question { font-weight: bold } \ <\/style><\/head>/g"