| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 | Ok, so you have downloaded the XML source. Now what? You are probablywanting to convert these XML files to easier to read HTML, PS, PDF, txtor other formatted files. All that can be read below.Let's start by downloading some software.If all you want to do is being able to convert XML to HTML download thefollowing:OpenJade                  - http://openjade.sourceforge.netDocBook-XML DTD           - http://www.docbook.org/xml/4.1.2/DSSSL DocBook Stylesheets - http://www.nwalsh.com/docbook/dsssl/As the DocBook DTD and Stylesheets are made available as a zip achives you may need to download the unzip package as well if your Linux system doesn't have one:Unzip                     - ftp://ftp.info-zip.org/pub/infozip/src/If you want to be able to convert the book into PS and PDF as well Irecommend using the Htmldoc program. This takes a html file (createdwith openjade which you already downloaded) and converts it to PS orPDF:HTMLDOC                   - http://www.easysw.com/htmldoc/FLTK (X front-end)        - http://sourceforge.net/projects/fltkIf you want to be able to convert the book into TXT as well I recommendusing lynx to convert HTML to TXT using the -dump option to lynx. Thereare most likely better programs to do this, but Lynx is often installedon systems anyways (as a console based web browser).Lynx                      - http://lynx.browser.orgYou have everything you need now. Let's install this stuff.Create the /usr/share/docbook directory, cd into it and unpack thedocbook-xml dtd archive there.Create the /usr/share/dsssl directory, cd into it and unpack the dssslstylesheet archive in there. Now copy the lfs.dsl file you will find inthe LFS-BOOK XML archive into /usr/share/dsssl/docbook/htmlThe last step is installed OpenJade.In order for openjade to be able to convert the DocBook based documentsinto other formats, it needs to know where the DocBook DTD relatedfiles are located. This is sort of the DocBook equivalent for the $PATH variable. You have two ways of doing this:1) You can set the $SGML_CATALOG_FILES variable and include the fullpaths to the catalog files in it   or2) You can hard-code the paths into the openjade binary.If you choose option 1, add the following to your bash configurationfile, system wide profile or wherever you wish to include it:export SGML_CATALOG_FILES=/usr/share/docbook/docbook.cat:/usr/share/dsssl/docbook/catalog:/usr/share/dsssl/openjade/catalogFollowed by installing openjade by running:	./configure --prefix=/usr	make	make install	cp -av dsssl /usr/share/dsssl/openjadeIf you choose option 2, install OpenJade as follows:	./configure --prefix=/usr \	> --enable-default-catalog=/usr/share/docbook/docbook.cat:/usr/share/dsssl/docbook/catalog:/usr/share/dsssl/openjade/catalog	make	make install	cp -av dsssl /usr/share/dsssl/openjadeAnd you don't have to worry about the $SGML_CATALOG_FILES variable inthis case.You're all set to convert XML to HTML (among a few other formatssupported by openjade) now. If you want to convert to PS and PDF aswell, install the following two packages.FLTK (you can skip this one if you don't want the X front-end):	./configure --prefix=/usr	make	make installHTMLDOC:Edit the Makefile.in file and find these lines:install:    $(MAKE) all    for dir in $(INSTALLDIRS); do\        echo Installing in $$dir...;\        (cd $$dir; $(MAKE) -$(MAKEFLAGS) clean) || break;\    doneChange this into:install:    $(MAKE) all    for dir in $(INSTALLDIRS); do\        echo Installing in $$dir...;\        (cd $$dir; $(MAKE) -$(MAKEFLAGS) install) || break;\    doneThis will fix that little bug that causes 'make install' to beidentical to 'make clean'. Now continue with:	./configure --prefix=/usr	make	make installThe last package is Lynx which will be used for the HTML to TXTconversion. Install it by running:	./configure --prefix=/usr	make	make installThere, all set now. Go back to the README file for some examples how toconvert this XML to the various other formats.
 |