[6da4d5a6] | 1 | THIS IS OUT OF DATE. UPDATE PENDING.
|
---|
| 2 |
|
---|
| 3 |
|
---|
[f45b1953] | 4 | Ok, so you have downloaded the XML source. Now what? You are probably
|
---|
| 5 | wanting to convert these XML files to easier to read HTML, PS, PDF, TXT
|
---|
| 6 | or other formatted files. All that can be read below.
|
---|
| 7 |
|
---|
| 8 | Let's start by downloading some software.
|
---|
| 9 |
|
---|
| 10 | If all you want to do is being able to convert XML to HTML download the
|
---|
| 11 | following:
|
---|
| 12 |
|
---|
| 13 | OpenJade - http://openjade.sourceforge.net/
|
---|
| 14 | DocBook-XML DTD - http://www.docbook.org/xml/4.1.2/
|
---|
| 15 | Modified DocBook Entities -
|
---|
[3c5b078] | 16 | http://linuxfromscratch.org/~gerard/docbook-4.1.2-newent.tar.bz2
|
---|
[f45b1953] | 17 | DSSSL DocBook Stylesheets - http://www.nwalsh.com/docbook/dsssl/
|
---|
| 18 |
|
---|
| 19 | As the DocBook DTD and Stylesheets are made available as a zip achives you
|
---|
| 20 | may need to download the unzip package as well if your Linux system doesn't
|
---|
| 21 | have one:
|
---|
| 22 |
|
---|
| 23 | Unzip - ftp://ftp.uu.net/pub/archiving/zip/src/
|
---|
| 24 |
|
---|
| 25 | If you want to be able to convert the book into PS and PDF as well I
|
---|
| 26 | recommend using the Htmldoc program. This takes a html file (created
|
---|
| 27 | with openjade which you already downloaded) and converts it to PS or
|
---|
| 28 | PDF:
|
---|
| 29 |
|
---|
| 30 | HTMLDOC - http://www.easysw.com/htmldoc/
|
---|
| 31 | FLTK (X front-end) - http://sourceforge.net/projects/fltk
|
---|
| 32 |
|
---|
| 33 | If you want to be able to convert the book into TXT as well I recommend
|
---|
| 34 | using lynx to convert HTML to TXT using the -dump option to lynx.
|
---|
| 35 |
|
---|
| 36 | Lynx - http://lynx.browser.org
|
---|
| 37 |
|
---|
| 38 | You have everything you need now. Let's install this stuff.
|
---|
| 39 |
|
---|
| 40 | Create the /usr/share/docbook directory, cd into it and unpack the
|
---|
| 41 | docbook-xml dtd archive there. Move all the files and directories from
|
---|
| 42 | the newly created subdirectory to the current directory
|
---|
| 43 | (/usr/share/docbook). We don't really need a
|
---|
| 44 | /usr/share/docbook/docbook-<version> subdir for our purposes.
|
---|
| 45 |
|
---|
| 46 | Remove the ent directory and unpack the docbook-4.1.2-newent.tar.bz2 file.
|
---|
| 47 | This will create a new ent directory with entity files that work better
|
---|
| 48 | with XML.
|
---|
| 49 |
|
---|
| 50 | Create the /usr/share/dsssl directory, cd into it and unpack the dsssl
|
---|
| 51 | stylesheet archive in there. Rename the directory that's created by tar
|
---|
| 52 | into 'docbook'. Now create a symlink to the blfs.dsl file you will find
|
---|
| 53 | in the BLFS-BOOK XML archive in /usr/share/dsssl/docbook/html
|
---|
| 54 |
|
---|
| 55 | The last step is installing OpenJade.
|
---|
| 56 |
|
---|
| 57 | In order for openjade to be able to convert the DocBook based documents
|
---|
| 58 | into other formats, it needs to know where the DocBook DTD related
|
---|
| 59 | files are located. This is sort of the DocBook equivalent for the $PATH
|
---|
| 60 | variable. You have two ways of doing this:
|
---|
| 61 |
|
---|
| 62 | 1) You can set the $SGML_CATALOG_FILES variable and include the full
|
---|
| 63 | paths to the catalog files in it
|
---|
| 64 | or
|
---|
| 65 | 2) You can hard-code the paths into the openjade binary.
|
---|
| 66 |
|
---|
| 67 | If you choose option 1, add the following to your bash configuration
|
---|
| 68 | file, system wide profile or wherever you wish to include it:
|
---|
| 69 |
|
---|
| 70 | export SGML_CATALOG_FILES=/usr/share/docbook/docbook.cat:/usr/share/dsssl/docbook/catalog:/usr/share/dsssl/openjade/catalog
|
---|
| 71 |
|
---|
| 72 | Followed by installing openjade by running:
|
---|
| 73 | ./configure --prefix=/usr
|
---|
| 74 | make
|
---|
| 75 | make install
|
---|
| 76 | cp -av dsssl /usr/share/dsssl/openjade
|
---|
| 77 |
|
---|
| 78 | If you choose option 2, install OpenJade as follows:
|
---|
| 79 |
|
---|
| 80 | ./configure --prefix=/usr \
|
---|
| 81 | --enable-default-catalog=/usr/share/docbook/docbook.cat:/usr/share/dsssl/docbook/catalog:/usr/share/dsssl/openjade/catalog
|
---|
| 82 | make
|
---|
| 83 | make install
|
---|
| 84 | cp -av dsssl /usr/share/dsssl/openjade
|
---|
| 85 |
|
---|
| 86 | And you don't have to worry about the $SGML_CATALOG_FILES variable in
|
---|
| 87 | this case.
|
---|
| 88 |
|
---|
| 89 |
|
---|
| 90 | You're all set to convert XML to HTML (among a few other formats
|
---|
| 91 | supported by openjade) now. If you want to convert to PS and PDF as
|
---|
| 92 | well, install the following two packages.
|
---|
| 93 |
|
---|
| 94 | FLTK (you can skip this one if you don't want the X front-end):
|
---|
| 95 | ./configure --prefix=/usr
|
---|
| 96 | make
|
---|
| 97 | make install
|
---|
| 98 |
|
---|
| 99 | HTMLDOC:
|
---|
| 100 | Install by running:
|
---|
| 101 |
|
---|
| 102 | ./configure --prefix=/usr
|
---|
| 103 | make
|
---|
| 104 | make install
|
---|
| 105 |
|
---|
| 106 |
|
---|
| 107 |
|
---|
| 108 | The last package is Lynx which will be used for the HTML to TXT
|
---|
| 109 | conversion. Install it by running:
|
---|
| 110 |
|
---|
| 111 | ./configure --prefix=/usr
|
---|
| 112 | make
|
---|
| 113 | make install
|
---|
| 114 |
|
---|
| 115 | There, all set now. Go back to the README file for some examples how to
|
---|
| 116 | convert this XML to the various other formats.
|
---|
| 117 |
|
---|