INSTALL 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. Ok, so you have downloaded the XML source. Now what? You are probably
  2. wanting to convert these XML files to easier to read HTML, PS, PDF, txt
  3. or other formatted files. All that can be read below.
  4. Let's start by downloading some software.
  5. If all you want to do is being able to convert XML to HTML download the
  6. following:
  7. OpenJade - http://openjade.sourceforge.net
  8. DocBook-XML DTD - http://www.docbook.org/xml/4.1.2/
  9. DSSSL DocBook Stylesheets - http://www.nwalsh.com/docbook/dsssl/
  10. As the DocBook DTD and Stylesheets are made available as a zip achives you
  11. may need to download the unzip package as well if your Linux system doesn't
  12. have one:
  13. Unzip - ftp://ftp.uu.net/pub/archiving/zip/src/
  14. If you want to be able to convert the book into PS and PDF as well I
  15. recommend using the Htmldoc program. This takes a html file (created
  16. with openjade which you already downloaded) and converts it to PS or
  17. PDF:
  18. HTMLDOC - http://www.easysw.com/htmldoc/
  19. FLTK (X front-end) - http://sourceforge.net/projects/fltk
  20. If you want to be able to convert the book into TXT as well I recommend
  21. using lynx to convert HTML to TXT using the -dump option to lynx. There
  22. are most likely better programs to do this, but Lynx is often installed
  23. on systems anyways (as a console based web browser). Another often used
  24. console based browser is Links which can be used in the same way as
  25. Lynx.
  26. Lynx - http://lynx.browser.org
  27. Links - http://artax.karlin.mff.cuni.cz/~mikulas/links/
  28. You have everything you need now. Let's install this stuff.
  29. Create the /usr/share/docbook directory, cd into it and unpack the
  30. docbook-xml dtd archive there.
  31. Create the /usr/share/dsssl directory, cd into it and unpack the dsssl
  32. stylesheet archive in there. Rename the directory that's created by tar
  33. into 'docbook'. Now copy the lfs.dsl file you will find in
  34. the LFS-BOOK XML archive into /usr/share/dsssl/docbook/html
  35. The last step is installing OpenJade.
  36. In order for openjade to be able to convert the DocBook based documents
  37. into other formats, it needs to know where the DocBook DTD related
  38. files are located. This is sort of the DocBook equivalent for the $PATH
  39. variable. You have two ways of doing this:
  40. 1) You can set the $SGML_CATALOG_FILES variable and include the full
  41. paths to the catalog files in it
  42. or
  43. 2) You can hard-code the paths into the openjade binary.
  44. If you choose option 1, add the following to your bash configuration
  45. file, system wide profile or wherever you wish to include it:
  46. export SGML_CATALOG_FILES=/usr/share/docbook/docbook.cat:/usr/share/dsssl/docbook/catalog:/usr/share/dsssl/openjade/catalog
  47. Followed by installing openjade by running:
  48. ./configure --prefix=/usr
  49. make
  50. make install
  51. cp -av dsssl /usr/share/dsssl/openjade
  52. If you choose option 2, install OpenJade as follows:
  53. ./configure --prefix=/usr \
  54. > --enable-default-catalog=/usr/share/docbook/docbook.cat:/usr/share/dsssl/docbook/catalog:/usr/share/dsssl/openjade/catalog
  55. make
  56. make install
  57. cp -av dsssl /usr/share/dsssl/openjade
  58. And you don't have to worry about the $SGML_CATALOG_FILES variable in
  59. this case.
  60. You're all set to convert XML to HTML (among a few other formats
  61. supported by openjade) now. If you want to convert to PS and PDF as
  62. well, install the following two packages.
  63. FLTK (you can skip this one if you don't want the X front-end):
  64. ./configure --prefix=/usr
  65. make
  66. make install
  67. HTMLDOC:
  68. Install by running:
  69. ./configure --prefix=/usr
  70. make
  71. make install
  72. The last package is Lynx which will be used for the HTML to TXT
  73. conversion. Install it by running:
  74. ./configure --prefix=/usr
  75. make
  76. make install
  77. There, all set now. Go back to the README file for some examples how to
  78. convert this XML to the various other formats.