1 | How do I convert these XML files to other formats like HTML, PF, PS
|
---|
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 \
|
---|
14 | /path/to/intel.xml
|
---|
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 |
|
---|
30 | They are normal in the sense of that it doesn't affect the output
|
---|
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:
|
---|
37 | /usr/bin/openjade -t sgml \
|
---|
38 | -V nochunks \
|
---|
39 | -d /usr/share/dsssl/docbook/html/lfs.dsl \
|
---|
40 | /usr/share/dsssl/docbook/dtds/decls/xml.dcl \
|
---|
41 | /path/to/intel.xml > nochunks.html
|
---|
42 |
|
---|
43 | XML to TXT:
|
---|
44 | -----------
|
---|
45 | First create the NOCHUNKS HTML file, then convert by running:
|
---|
46 | /usr/bin/lynx -dump nochunks.html > output.txt
|
---|
47 |
|
---|
48 | XML to PS and PDF:
|
---|
49 | ------------------
|
---|
50 | First create the NOCHUNKS HTML file, then convert by starting
|
---|
51 | htmldoc. You can use the GUI and select the options. If you're
|
---|
52 | satisfied with the default options you can run this command:
|
---|
53 |
|
---|
54 | /usr/bin/htmldoc --book --firstpage p1 -v -t <type> \
|
---|
55 | -f <output> nochunks.html
|
---|
56 |
|
---|
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
|
---|
59 | possible other options. Replace <output> with the filename of the ps or
|
---|
60 | pdf file that is to be generated.
|
---|
61 |
|
---|