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