mirror of
https://github.com/Zeckmathederg/glfs.git
synced 2025-01-23 22:42:14 +08:00
4ff86b9791
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@4491 af4574ff-66df-0310-9fd7-8a98e5e911e0
48 lines
1.7 KiB
Plaintext
48 lines
1.7 KiB
Plaintext
How do I convert these XML files to other formats like HTML, PDF,
|
|
and TXT? You need to have some software installed that deal with these
|
|
conversions. Please read the INSTALL file to determine what programs
|
|
you need to install and where to get instructions to install that software.
|
|
Then come back to this file for examples how to convert these files
|
|
into various other formats.
|
|
|
|
These instructions are also incorporated in the Makefile.
|
|
|
|
XML to HTML:
|
|
------------
|
|
Create a directory in which you want to store the HTML files: ~/blfs-html
|
|
Change to the top of the directory where the xml code is located.
|
|
Now run:
|
|
BASEDIR="~/blfs-html"
|
|
xsltproc --xinclude --nonet -stringparam base.dir $(BASEDIR) \
|
|
stylesheets/blfs-chunked.xsl index.xml
|
|
mkdir -p $(BASEDIR)stylesheets $(BASEDIR)images
|
|
cp stylesheets/*.css $(BASEDIR)stylesheets
|
|
cp images/*.png $(BASEDIR)/images
|
|
sed -i -e "s@../stylesheets@stylesheets@g" $(BASEDIR)/*.html
|
|
sed -i -e "s@../images@images@g" $(BASEDIR)/*.html
|
|
sh goTidy $(BASEDIR)/
|
|
|
|
|
|
XML to NOCHUNKS-HTML:
|
|
--------------------
|
|
The NOCHUNKS HTML version is one big HTML file:
|
|
xsltproc --xinclude --nonet -stringparam profile.condition html \
|
|
--output $(BASEDIR)/BLFS-BOOK.html stylesheets/blfs-nochunks.xsl index.xml
|
|
tidy -config tidy.conf $(BASEDIR)/BLFS-BOOK.html
|
|
sed -i -e "s@text/html@application/xhtml+xml@g" $(BASEDIR)/BLFS-BOOK.html
|
|
|
|
XML to TXT:
|
|
-----------
|
|
First create the NOCHUNKS HTML file, then convert by running:
|
|
/usr/bin/lynx -dump nochunks.html > output.txt
|
|
|
|
XML to PDF:
|
|
------------------
|
|
xsltproc --xinclude --nonet --output blfs.fo stylesheets/blfs-pdf.xsl index.xml
|
|
sed -i -e "s/inherit/all/" blfs.fo
|
|
fop.sh blfs.fo blfs.pdf
|
|
mkdir -p $(BASEDIR)/pdf
|
|
rm blfs.fo
|
|
mv blfs.pdf $(BASEDIR)/pdf
|
|
|