INSTALL 3.9 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. Modified DocBook Entities -
  10. http://linuxfromscratch.org/~gerard/docbook/docbook-4.1.2-newent.tar.bz2
  11. DSSSL DocBook Stylesheets - http://www.nwalsh.com/docbook/dsssl/
  12. As the DocBook DTD and Stylesheets are made available as zip archives you
  13. may need to download the unzip package as well if your Linux system doesn't
  14. have one:
  15. Unzip - ftp://ftp.uu.net/pub/archiving/zip/src/
  16. If you want to be able to convert the book into PS and PDF as well I
  17. recommend using the Htmldoc program. This takes a html file (created
  18. with openjade which you already downloaded) and converts it to PS or
  19. PDF:
  20. HTMLDOC - http://www.easysw.com/htmldoc/
  21. FLTK (X front-end) - http://sourceforge.net/projects/fltk
  22. If you want to be able to convert the book into TXT as well I recommend
  23. using lynx to convert HTML to TXT using the -dump option to lynx.
  24. Lynx - http://lynx.browser.org
  25. You have everything you need now. Let's install this stuff.
  26. Create the /usr/share/docbook directory, cd into it and unpack the
  27. docbook-xml dtd archive there. Move all the files and directories from
  28. the newly created subdirectory to the current directory
  29. (/usr/share/docbook). We don't really need a
  30. /usr/share/docbook/docbook-<version> subdir for our purposes.
  31. Remove the ent directory and unpack the docbook-4.1.2-newent.tar.bz2 file.
  32. This will create a new ent directory with entity files that work better
  33. with XML.
  34. Create the /usr/share/dsssl directory, cd into it and unpack the dsssl
  35. stylesheet archive in there. Rename the directory that's created by tar
  36. into 'docbook'. Now copy the lfs.dsl file you will find in
  37. the LFS-BOOK XML archive into /usr/share/dsssl/docbook/html
  38. The last step is installing OpenJade.
  39. In order for openjade to be able to convert the DocBook based documents
  40. into other formats, it needs to know where the DocBook DTD related
  41. files are located. This is sort of the DocBook equivalent for the $PATH
  42. variable. You have two ways of doing this:
  43. 1) You can set the $SGML_CATALOG_FILES variable and include the full
  44. paths to the catalog files in it
  45. or
  46. 2) You can hard-code the paths into the openjade binary.
  47. If you choose option 1, add the following to your bash configuration
  48. file, system wide profile or wherever you wish to include it:
  49. export SGML_CATALOG_FILES=/usr/share/docbook/docbook.cat:/usr/share/dsssl/docbook/catalog:/usr/share/dsssl/openjade/catalog
  50. Followed by installing openjade by running:
  51. ./configure --prefix=/usr
  52. make
  53. make install
  54. cp -av dsssl /usr/share/dsssl/openjade
  55. If you choose option 2, install OpenJade as follows:
  56. ./configure --prefix=/usr \
  57. > --enable-default-catalog=/usr/share/docbook/docbook.cat:/usr/share/dsssl/docbook/catalog:/usr/share/dsssl/openjade/catalog
  58. make
  59. make install
  60. cp -av dsssl /usr/share/dsssl/openjade
  61. And you don't have to worry about the $SGML_CATALOG_FILES variable in
  62. this case.
  63. You're all set to convert XML to HTML (among a few other formats
  64. supported by openjade) now. If you want to convert to PS and PDF as
  65. well, install the following two packages.
  66. FLTK (you can skip this one if you don't want the X front-end):
  67. ./configure --prefix=/usr
  68. make
  69. make install
  70. Install HTMLDOC by running:
  71. ./configure --prefix=/usr
  72. make
  73. make install
  74. The last package is Lynx which will be used for the HTML to TXT
  75. conversion. Install it by running:
  76. ./configure --prefix=/usr
  77. make
  78. make install
  79. There, all set now. Go back to the README file for some examples how to
  80. convert this XML to the various other formats.