README,v 1.4 2005/08/16 01:06:59 bosborne Exp

These HOWTOs are written in DocBook XML.  See the LDP at
http://www.tldp.org for more information on how to write documents in
DocBook, in particular the LDP Author guide. DocBook XML can be
turned into PDF, HTML, text, and RTF (which can be turned into
MS Word).

As of this writing one cannot turn Docbook XML into these formats
using one single open source package. The HTML, PDF, and text versions
of the XML were created using saxon-j, XEP, and lynx,
respectively. In addition, the XSL stylesheets from the e-novative 
eDe package were used, with these stylesheets one can create some
attractive documents. All of the necessary stylesheets and associated 
files have been added to the Bioperl package. Example code is shown below. 


# Docbook XML to HTML, PDF, and text using e-novative
# stylesheets, saxon-j version 6, XEP , and lynx.

setenv HTML_STYLE '~/bioperl-live/doc/howto/xml/stylesheet/e-novative_article_html.xsl'
setenv PDF_STYLE '~/bioperl-live/doc/howto/xml/stylesheet/e-novative_article_fo.xsl'
setenv XML_HOME '~/bioperl-live/doc/howto/xml'
setenv SAXON_JAR '/usr/local/saxon6-5-4/saxon.jar'
setenv JAVA '/usr/bin/java'
setenv LYNX '/sw/bin/lynx'
setenv XEP_JAR '/usr/local/RenderX/XEP/lib/saxon.jar'
setenv XEP '/usr/local/RenderX/XEP/xep'

foreach XML ($XML_HOME/[A-Z]*.xml)

    setenv HTML `echo $XML | sed 's/\.xml/\.html/'`
    # Create HTML file
    echo "Creating $HTML..."
    $JAVA -jar $SAXON_JAR -o $HTML $XML $HTML_STYLE use.extensions=1 

    setenv TXT `echo $XML | sed 's/\.xml/\.txt/'`
    # Create text from HTML file
    echo "Creating $TXT..."
    $LYNX -dump $HTML > $TXT

    setenv FO `echo $XML | sed 's/\.xml/\.fo/'`
    # Create FO file
    echo "Creating $FO..."
    $JAVA -jar $XEP_JAR -o $FO $XML $PDF_STYLE

    setenv PDF `echo $XML | sed 's/\.xml/\.pdf/'`
    # Create PDF
    echo "Creating $PDF..."
    $XEP -fo $FO -pdf $PDF

end
