10.0
10.1
11.0
11.1
11.2
11.3
12.0
12.1
12.2
6.1
6.2
6.2.0
6.2.0-rc1
6.2.0-rc2
6.3
6.3-rc1
6.3-rc2
6.3-rc3
7.10
7.4
7.5
7.6
7.6-blfs
7.6-systemd
7.7
7.8
7.9
8.0
8.1
8.2
8.3
8.4
9.0
9.1
basic
bdubbs/svn
elogind
gimp3
gnome
kde5-13430
kde5-14269
kde5-14686
kea
ken/TL2024
ken/inkscape-core-mods
ken/tuningfonts
krejzi/svn
lazarus
lxqt
nosym
perl-modules
plabs/newcss
plabs/python-mods
python3.11
qt5new
rahul/power-profiles-daemon
renodr/vulkan-addition
systemd-11177
systemd-13485
trunk
upgradedb
xry111/for-12.3
xry111/intltool
xry111/llvm18
xry111/soup3
xry111/spidermonkey128
xry111/test-20220226
xry111/xf86-video-removal
Last change
on this file since d718d6ad was 97e4364, checked in by Bruce Dubbs <bdubbs@…>, 19 years ago |
Making README and INSTALL current
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@3817 af4574ff-66df-0310-9fd7-8a98e5e911e0
|
-
Property mode
set to
100644
|
File size:
1.8 KB
|
Rev | Line | |
---|
[97e4364] | 1 | How do I convert these XML files to other formats like HTML, PDF,
|
---|
[f45b1953] | 2 | and TXT? You need to have some software installed that deal with these
|
---|
[97e4364] | 3 | conversions. Please read the INSTALL file to determine what programs
|
---|
| 4 | you need to install and where to get instructions to install that software.
|
---|
[f45b1953] | 5 | Then come back to this file for examples how to convert these files
|
---|
| 6 | into various other formats.
|
---|
| 7 |
|
---|
[97e4364] | 8 | These instructions are also incorporated in the Makefile.
|
---|
| 9 |
|
---|
[f45b1953] | 10 | XML to HTML:
|
---|
| 11 | ------------
|
---|
[97e4364] | 12 | Create a directory in which you want to store the HTML files: ~/blfs-html
|
---|
| 13 | Change to the top of the directory where the xml code is located.
|
---|
| 14 | Now run:
|
---|
| 15 | BASEDIR="~/blfs-html"
|
---|
| 16 | xsltproc --xinclude --nonet -stringparam base.dir $(BASEDIR) \
|
---|
| 17 | stylesheets/blfs-chunked.xsl index.xml
|
---|
| 18 | mkdir -p $(BASEDIR)stylesheets $(BASEDIR)images
|
---|
| 19 | cp stylesheets/*.css $(BASEDIR)stylesheets
|
---|
| 20 | cp images/*.png $(BASEDIR)/images
|
---|
| 21 | sed -i -e "s@../stylesheets@stylesheets@g" $(BASEDIR)/*.html
|
---|
| 22 | sed -i -e "s@../images@images@g" $(BASEDIR)/*.html
|
---|
| 23 | sh goTidy $(BASEDIR)/
|
---|
[f45b1953] | 24 |
|
---|
| 25 |
|
---|
| 26 | XML to NOCHUNKS-HTML:
|
---|
| 27 | --------------------
|
---|
| 28 | The NOCHUNKS HTML version is one big HTML file:
|
---|
[97e4364] | 29 | xsltproc --xinclude --nonet -stringparam profile.condition html \
|
---|
| 30 | --output $(BASEDIR)/BLFS-BOOK.html stylesheets/blfs-nochunks.xsl index.xml
|
---|
| 31 | tidy -config tidy.conf $(BASEDIR)/BLFS-BOOK.html
|
---|
| 32 | sed -i -e "s@text/html@application/xhtml+xml@g" $(BASEDIR)/BLFS-BOOK.html
|
---|
[f45b1953] | 33 |
|
---|
| 34 | XML to TXT:
|
---|
| 35 | -----------
|
---|
| 36 | First create the NOCHUNKS HTML file, then convert by running:
|
---|
| 37 | /usr/bin/lynx -dump nochunks.html > output.txt
|
---|
| 38 |
|
---|
[97e4364] | 39 | XML to PDF:
|
---|
[f45b1953] | 40 | ------------------
|
---|
[97e4364] | 41 | xsltproc --xinclude --nonet --output blfs.fo stylesheets/blfs-pdf.xsl index.xml
|
---|
| 42 | sed -i -e "s/inherit/all/" blfs.fo
|
---|
| 43 | fop.sh blfs.fo blfs.pdf
|
---|
| 44 | mkdir -p $(BASEDIR)/pdf
|
---|
| 45 | rm blfs.fo
|
---|
| 46 | mv blfs.pdf $(BASEDIR)/pdf
|
---|
| 47 |
|
---|
[f45b1953] | 48 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.