Changeset 97e4364
- Timestamp:
- 04/28/2005 06:29:06 PM (19 years ago)
- Branches:
- 10.0, 10.1, 11.0, 11.1, 11.2, 11.3, 12.0, 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, gnome, kde5-13430, kde5-14269, kde5-14686, kea, ken/inkscape-core-mods, ken/tuningfonts, krejzi/svn, lazarus, lxqt, nosym, perl-modules, plabs/python-mods, qt5new, renodr/vulkan-addition, systemd-11177, systemd-13485, trunk, upgradedb, xry111/intltool, xry111/soup3, xry111/test-20220226, xry111/xf86-video-removal
- Children:
- 4705fa4
- Parents:
- f7fc4ac
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
INSTALL
rf7fc4ac r97e4364 1 THIS IS OUT OF DATE. UPDATE PENDING.2 3 1 4 2 Ok, so you have downloaded the XML source. Now what? You are probably 5 wanting to convert these XML files to easier to read HTML, P S, PDF, TXT6 or other formatted files. All that can be read below.3 wanting to convert these XML files to easier to read HTML, PDF, TXT 4 or other formatted files. 7 5 8 Let's start by downloading some software. 6 To install the programs you need to generate these formats, you need 7 to have or install the following packages: 9 8 10 If all you want to do is being able to convert XML to HTML download the 11 following: 9 libxml2 10 libxslt 11 DocBook XSL Stylesheets-1.68.1 12 tidy (optional for html) 13 lynx (for text) 14 JDK-1.5 (for pdf) 15 FOP (for pdf) 12 16 13 OpenJade - http://openjade.sourceforge.net/ 14 DocBook-XML DTD - http://www.docbook.org/xml/4.1.2/ 15 Modified DocBook Entities - 16 http://linuxfromscratch.org/~gerard/docbook-4.1.2-newent.tar.bz2 17 DSSSL DocBook Stylesheets - http://www.nwalsh.com/docbook/dsssl/ 18 19 As the DocBook DTD and Stylesheets are made available as a zip achives you 20 may need to download the unzip package as well if your Linux system doesn't 21 have one: 22 23 Unzip - ftp://ftp.uu.net/pub/archiving/zip/src/ 24 25 If you want to be able to convert the book into PS and PDF as well I 26 recommend using the Htmldoc program. This takes a html file (created 27 with openjade which you already downloaded) and converts it to PS or 28 PDF: 29 30 HTMLDOC - http://www.easysw.com/htmldoc/ 31 FLTK (X front-end) - http://sourceforge.net/projects/fltk 32 33 If you want to be able to convert the book into TXT as well I recommend 34 using lynx to convert HTML to TXT using the -dump option to lynx. 35 36 Lynx - http://lynx.browser.org 37 38 You have everything you need now. Let's install this stuff. 39 40 Create the /usr/share/docbook directory, cd into it and unpack the 41 docbook-xml dtd archive there. Move all the files and directories from 42 the newly created subdirectory to the current directory 43 (/usr/share/docbook). We don't really need a 44 /usr/share/docbook/docbook-<version> subdir for our purposes. 45 46 Remove the ent directory and unpack the docbook-4.1.2-newent.tar.bz2 file. 47 This will create a new ent directory with entity files that work better 48 with XML. 49 50 Create the /usr/share/dsssl directory, cd into it and unpack the dsssl 51 stylesheet archive in there. Rename the directory that's created by tar 52 into 'docbook'. Now create a symlink to the blfs.dsl file you will find 53 in the BLFS-BOOK XML archive in /usr/share/dsssl/docbook/html 54 55 The last step is installing OpenJade. 56 57 In order for openjade to be able to convert the DocBook based documents 58 into other formats, it needs to know where the DocBook DTD related 59 files are located. This is sort of the DocBook equivalent for the $PATH 60 variable. You have two ways of doing this: 61 62 1) You can set the $SGML_CATALOG_FILES variable and include the full 63 paths to the catalog files in it 64 or 65 2) You can hard-code the paths into the openjade binary. 66 67 If you choose option 1, add the following to your bash configuration 68 file, system wide profile or wherever you wish to include it: 69 70 export SGML_CATALOG_FILES=/usr/share/docbook/docbook.cat:/usr/share/dsssl/docbook/catalog:/usr/share/dsssl/openjade/catalog 71 72 Followed by installing openjade by running: 73 ./configure --prefix=/usr 74 make 75 make install 76 cp -av dsssl /usr/share/dsssl/openjade 77 78 If you choose option 2, install OpenJade as follows: 79 80 ./configure --prefix=/usr \ 81 --enable-default-catalog=/usr/share/docbook/docbook.cat:/usr/share/dsssl/docbook/catalog:/usr/share/dsssl/openjade/catalog 82 make 83 make install 84 cp -av dsssl /usr/share/dsssl/openjade 85 86 And you don't have to worry about the $SGML_CATALOG_FILES variable in 87 this case. 88 89 90 You're all set to convert XML to HTML (among a few other formats 91 supported by openjade) now. If you want to convert to PS and PDF as 92 well, install the following two packages. 93 94 FLTK (you can skip this one if you don't want the X front-end): 95 ./configure --prefix=/usr 96 make 97 make install 98 99 HTMLDOC: 100 Install by running: 101 102 ./configure --prefix=/usr 103 make 104 make install 17 The intallation instructions for all these packages are available 18 in the BLFS book from one of the mirrors found at 19 http://beyond.linuxfromacratch.org. 105 20 106 21 107 22 108 The last package is Lynx which will be used for the HTML to TXT109 conversion. Install it by running:110 23 111 ./configure --prefix=/usr112 make113 make install114 115 There, all set now. Go back to the README file for some examples how to116 convert this XML to the various other formats.117 -
README
rf7fc4ac r97e4364 1 OUT OF DATE. UPDATE PENDING. 2 3 How do I convert these XML files to other formats like HTML, PF, PS 1 How do I convert these XML files to other formats like HTML, PDF, 4 2 and TXT? You need to have some software installed that deal with these 5 conversions. Please read the INSTALL file how to install that software. 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. 6 5 Then come back to this file for examples how to convert these files 7 6 into various other formats. 8 7 8 These instructions are also incorporated in the Makefile. 9 9 10 XML to HTML: 10 11 ------------ 11 Create a directory in which you want to store the HTML files and cd into 12 that directory. Now run: 13 mkdir introduction postlfs general connect basicnet server \ 14 content x kde gnome xsoft multimedia pst preface \ 15 appendices other 16 /usr/bin/openjade -t xml \ 17 -d /usr/share/dsssl/docbook/html/blfs.dsl \ 18 /usr/share/dsssl/docbook/dtds/decls/xml.dcl \ 19 /path/to/index.xml 20 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)/ 21 24 22 25 … … 24 27 -------------------- 25 28 The NOCHUNKS HTML version is one big HTML file: 26 /usr/bin/openjade -t sgml \ 27 -V nochunks \ 28 -d /usr/share/dsssl/docbook/html/blfs.dsl \ 29 /usr/share/dsssl/docbook/dtds/decls/xml.dcl \ 30 /path/to/index.xml > nochunks.html 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 31 33 32 34 XML to TXT: … … 35 37 /usr/bin/lynx -dump nochunks.html > output.txt 36 38 37 XML to P S and PDF:39 XML to PDF: 38 40 ------------------ 39 First create the NOCHUNKS HTML file, then convert by starting 40 htmldoc. You can use the GUI and select the options. If you're 41 satisfied with the default options you can run this command: 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 42 48 43 /usr/bin/htmldoc --book --firstpage p1 -v -t <type> \44 -f <output> nochunks.html45 46 replace <type> by pdf13 to create a pdf file or replace <type> by ps3 to47 create a ps file. There are other pdf and ps levels, see the man page for48 possible other options. Replace <output> with the filename of the ps or49 pdf file that is to be generated.50
Note:
See TracChangeset
for help on using the changeset viewer.