[7af24ee] | 1 | How do I convert these XML files to other formats like HTML, PF, PS
|
---|
[2fadfb6] | 2 | and TXT? You need to have some software installed that deal with these
|
---|
| 3 | conversions. Please read the INSTALL file how to install that software.
|
---|
| 4 | Then come back to this file for examples how to convert these files
|
---|
| 5 | into various other formats.
|
---|
| 6 |
|
---|
| 7 | XML to HTML:
|
---|
| 8 | ------------
|
---|
| 9 | Create a directory in which you want to store the HTML files and cd into
|
---|
| 10 | that directory. Now run:
|
---|
| 11 | /usr/bin/openjade -t sgml \
|
---|
| 12 | -d /usr/share/dsssl/docbook/html/lfs.dsl \
|
---|
| 13 | /usr/share/dsssl/docbook/dtds/decls/xml.dcl \
|
---|
[713cffb] | 14 | /path/to/index.xml
|
---|
[2fadfb6] | 15 |
|
---|
| 16 | While openjade is running you will see a lot of the following kind of
|
---|
| 17 | errors:
|
---|
| 18 |
|
---|
| 19 | /usr/bin/openjade:/usr/share/docbook/ent/iso-lat1.ent:6:19:E: "X00E1"
|
---|
| 20 | is not a function name
|
---|
| 21 | /usr/bin/openjade:/usr/share/docbook/ent/iso-lat1.ent:7:19:E: "X00C1"
|
---|
| 22 | is not a function name
|
---|
| 23 | /usr/bin/openjade:/usr/share/docbook/ent/iso-lat1.ent:8:18:E: "X00E2"
|
---|
| 24 | is not a function name
|
---|
| 25 | /usr/bin/openjade:/usr/share/docbook/ent/iso-lat1.ent:9:18:E: "X00C2"
|
---|
| 26 | is not a function name
|
---|
| 27 | /usr/bin/openjade:/usr/share/docbook/ent/iso-lat1.ent:10:19:E: "X00E0"
|
---|
| 28 | is not a function name
|
---|
| 29 |
|
---|
[f1aacd8c] | 30 | They are normal in the sense of that it doesn't affect the output
|
---|
[2fadfb6] | 31 | files. A fix hasn't been found yet so we'll just have to live with it.
|
---|
| 32 |
|
---|
| 33 |
|
---|
| 34 | XML to NOCHUNKS-HTML:
|
---|
| 35 | --------------------
|
---|
| 36 | The NOCHUNKS HTML version is one big HTML file:
|
---|
[f9d9132] | 37 | /usr/bin/openjade -t sgml \
|
---|
[2fadfb6] | 38 | -V nochunks \
|
---|
| 39 | -d /usr/share/dsssl/docbook/html/lfs.dsl \
|
---|
| 40 | /usr/share/dsssl/docbook/dtds/decls/xml.dcl \
|
---|
[713cffb] | 41 | /path/to/index.xml > nochunks.html
|
---|
[2fadfb6] | 42 |
|
---|
| 43 | XML to TXT:
|
---|
| 44 | -----------
|
---|
| 45 | First create the NOCHUNKS HTML file, then convert by running:
|
---|
[d9137e3] | 46 | /usr/bin/lynx -dump nochunks.html > output.txt
|
---|
[2fadfb6] | 47 |
|
---|
[a630bdb9] | 48 | XML to PS and PDF:
|
---|
[0c21363e] | 49 | ------------------
|
---|
[2fadfb6] | 50 | First create the NOCHUNKS HTML file, then convert by starting
|
---|
[a630bdb9] | 51 | htmldoc. You can use the GUI and select the options. If you're
|
---|
[76ef2ec9] | 52 | satisfied with the default options you can run this command:
|
---|
[2fadfb6] | 53 |
|
---|
[a630bdb9] | 54 | /usr/bin/htmldoc --book --firstpage p1 -v -t <type> \
|
---|
| 55 | -f <output> nochunks.html
|
---|
[2fadfb6] | 56 |
|
---|
[f1aacd8c] | 57 | replace <type> by pdf13 to create a pdf file or replace <type> by ps3 to
|
---|
| 58 | create a ps file. There are other pdf and ps levels, see the man page for
|
---|
[a630bdb9] | 59 | possible other options. Replace <output> with the filename of the ps or
|
---|
| 60 | pdf file that is to be generated.
|
---|
[2fadfb6] | 61 |
|
---|