Typo
[linux_from_scratch_hints.git] / OLD / docbook.txt
blob68820dd68a03973775aa571f5d623e9fd2b9a64e
1 TITLE:          Installing Docbook DTDs and Tools
3 LFS VERSION:    Any.
5 AUTHOR:         Tushar Teredesai <Tush@Yahoo.Com>
7 SYNOPSIS:
8         How to install docbook DTDs, tools and utilities.
10 HINT:
12 The primary location for this site is <http://tushar.lfsforum.org>, thanks to
13 Deutsche LFS Foren. The latest version of the hint and any relevant patches are
14 available at that site. Please refer to the primary location before submitting
15 bug-reports/enhancements to this hint.
17 You may freely copy this document or create derivate works or distribute the
18 document in any format. At your discretion, you may give credit to the original
19 author:)
21 Use the hint at your own risk. Neither the author, nor the Linux From Scratch
22 project accepts any reponsibility for anything that happens when using these
23 documents or associated files.
25 An appropriate place to discuss this hint is blfs-support MailingList/NewsGroup
26 at LinuxFromScratch.Org.
29 Change Log:
30 [2002-12-04]
31         * Added URIs of interest.
32         * Added OpenSP package.
33         * Added descriptions for packages.
34         * Modified some installation instructions.
35 [2002-08-16]
36         * Added files to be downloaded.
37 [2002-08-07]
38         * Made some changes so that it is easier to upgrade.
39         * Added some more catalogs.
40 [2002-07-08]
41         * First public version.
43 Pre-requisites (post LFS):
44         * InfoZip Unzip <http://freshmeat.net/projects/unzip/>
45         * LibXML <http://freshmeat.net/projects/libxml/>
48 WARNING:
49 This hint does not stick to the 80 column limit for the commands since the
50 commands are very long and difficult to break strings without applying
51 unneccessary variable manipulation.
53 We will install scripts so that will allow centralized SGML and XML catalogs and
54 hence there won't be any need for setting the SGML_CATALOG_FILES variable. Most
55 of the installation scripts are straight forward (install package & then install
56 catalog). Hence I won't bore you with lot of details.
58 In each of the following installs the VERSION variable refers to the version you
59 are installing and the PREVIOUS variable refers to the previous version of the
60 package installed. So set the variables accordingly. If you are installing the
61 package for the first time, do not set the PREVIOUS variable. Set the VERSION
62 variable to the version you are installing.
64 The easiest way to use the instructions are to save the instructions into
65 individual files and then source the file.
67 For each of the packages given below, I will mention the URLs of the files to be
68 downloaded followed by the instructions. Before downloading the files below,
69 download the files from the site mentioned above.
71 This hint is primarily written for a user wanting to install the prereqs for
72 GNOME. Hence note that scrollkeeper has some dependencies that may not have been
73 installed. So don't install scrollkeeper right now but come back to check on the
74 instructions when scrollkeeper is installed as per the GNOME instructions.
76 Also, you don't need to install all packages to satisfy GNOME. You may skip
77 docbook-utils and docbook-xml-simple-dtd.
80 sgml-common (0.6.3):
81 The sgml-common package gathers very basic stuff necessary to work with SGML and
82 XML, such as xml.dcl, a SGML declaration of XML; iso-entities, a list of the
83 basic SGML ISO entities; and install-catalog, a script used to add entries to
84 (or remove entries from) centralized catalogs whose entries are pointers to SGML
85 open catalogs, as defined by OASIS. It also includes sgmlwhich, a small script
86 which prints where the SGML main configuration file is located (provided for
87 compatibility with non-FHS systems).
89 * http://freshmeat.net/projects/sgml-common/
91 * ftp://sources.redhat.com/pub/docbook-tools/new-trials/SOURCES/sgml-common-0.6.3.tgz
93         ./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man
94         make
95         make install
96         ROOTCATALOG=/etc/xml/catalog
97         DOCBOOKCATALOG=/etc/xml/docbook
98         if [ ! -e ${ROOTCATALOG} ]; then xmlcatalog --noout --create ${ROOTCATALOG}; fi
99         if [ ! -e ${DOCBOOKCATALOG} ]; then xmlcatalog --noout --create ${DOCBOOKCATALOG}; fi
100         xmlcatalog --sgml --noout --add /etc/sgml/sgml-ent.cat /usr/share/sgml/sgml-iso-entities-8879.1986/catalog
101         xmlcatalog --sgml --noout --add /etc/sgml/sgml-docbook.cat /etc/sgml/sgml-ent.cat
102         xmlcatalog --noout --add "delegatePublic" "-//OASIS//ENTITIES DocBook XML" "file://$DOCBOOKCATALOG" $ROOTCATALOG
103         xmlcatalog --noout --add "delegatePublic" "-//OASIS//DTD DocBook XML" "file://$ROOTCATALOG" $ROOTCATALOG
104         xmlcatalog --noout --add "delegatePublic" "ISO 8879:1986" "file://$ROOTCATALOG" $ROOTCATALOG
105         xmlcatalog --noout --add "delegateSystem" "http://www.oasis-open.org/docbook/" "file://$ROOTCATALOG" $ROOTCATALOG
106         xmlcatalog --noout --add "delegateURI" "http://www.oasis-open.org/docbook/" "file://$ROOTCATALOG" $ROOTCATALOG
109 OpenSP (1.5):
110 OpenSP is a library and a set of tools for validating, parsing and manipulating
111 SGML and XML documents. The library is written in C++ and can be used to add
112 SGML/XML parsing facilities to projects.
114 * http://freshmeat.net/projects/opensp/
116 * http://download.sourceforge.net/openjade/OpenSP-1.5.tar.gz
118         ./configure --prefix=/usr --disable-static --enable-http --enable-default-catalog=/etc/sgml/catalog --enable-default-search-path=/usr/share/sgml --enable-xml-messages
119         make pkgdatadir=/usr/share/sgml/OpenSP-${VERSION}
120         if [ ! -z ${PREVIOUS} ]
121         then
122                 install-catalog --remove /etc/sgml/OpenSP-${PREVIOUS}.cat /usr/share/sgml/OpenSP-${PREVIOUS}/catalog
123                 install-catalog --remove /etc/sgml/sgml-docbook.cat /etc/sgml/OpenSP-${PREVIOUS}.cat
124         fi
125         make pkgdatadir=/usr/share/sgml/OpenSP-${VERSION} install
126         ln -sf onsgmls /usr/bin/nsgmls
127         ln -sf osgmlnorm /usr/bin/sgmlnorm
128         ln -sf ospam /usr/bin/spam
129         ln -sf ospcat /usr/bin/spcat
130         ln -sf ospent /usr/bin/spent
131         ln -sf osx /usr/bin/sx
132         ln -sf osx /usr/bin/sgml2xml
133         ln -sf libosp.so /usr/lib/libsp.so
134         install-catalog --add /etc/sgml/OpenSP-${VERSION}.cat /usr/share/sgml/OpenSP-${VERSION}/catalog
135         install-catalog --add /etc/sgml/sgml-docbook.cat
138 openjade (1.3.2):
140 * http://freshmeat.net/projects/openjade/
142 * http://download.sourceforge.net/openjade/openjade-1.3.2.tar.gz
144         ./configure --prefix=/usr --enable-http --disable-static --enable-default-catalog=/etc/sgml/catalog --enable-default-search-path=/usr/share/sgml --datadir=/usr/share/sgml/openjade-${VERSION}
145         make
146         if [ ! -z ${PREVIOUS} ]
147         then
148                 install-catalog --remove /etc/sgml/openjade-${PREVIOUS}.cat /usr/share/sgml/openjade-${PREVIOUS}/catalog
149                 install-catalog --remove /etc/sgml/sgml-docbook.cat /etc/sgml/openjade-${PREVIOUS}.cat
150         fi
151         make install
152         ln -sf openjade /usr/bin/jade
153         ln -sf libogrove.so /usr/lib/libgrove.so
154         ln -sf libospgrove.so /usr/lib/libspgrove.so
155         ln -sf libostyle.so /usr/lib/libstyle.so
156         install -m644 dsssl/catalog /usr/share/sgml/openjade-${VERSION}/
157         install -m644 dsssl/*.dtd dsssl/*.dsl dsssl/*.sgm /usr/share/sgml/openjade-${VERSION}
158         install-catalog --add /etc/sgml/openjade-${VERSION}.cat /usr/share/sgml/openjade-${VERSION}/catalog
159         install-catalog --add /etc/sgml/sgml-docbook.cat /etc/sgml/openjade-${VERSION}.cat
162 docbook-sgml-dtd (3.1, 4.1, 4.2):
163 Docbook SGML DTDs. All versions need to be installed simaltaneously. There are
164 additional version (3.0 and 4.0) which are not covered in this hint.
166 * http://freshmeat.net/projects/docbook/
168 * http://www.oasis-open.org/docbook/sgml/3.1/docbk31.zip
169 * http://www.oasis-open.org/docbook/sgml/4.1/docbk41.zip
170 * http://www.oasis-open.org/docbook/sgml/4.2/docbook-4.2.zip
171 * ftp://sources.redhat.com/pub/docbook-tools/new-trials/SOURCES/docbook-dtd31-sgml-1.0.catalog.patch
172 * ftp://sources.redhat.com/pub/docbook-tools/new-trials/SOURCES/docbook-dtd41-sgml-1.0.catalog.patch
173 * ftp://sources.redhat.com/pub/docbook-tools/new-trials/SOURCES/docbook-dtd31-sgml-1.0.Makefile
174 * ftp://sources.redhat.com/pub/docbook-tools/new-trials/SOURCES/docbook-dtd41-sgml-1.0.Makefile
176         V=${VERSION/.}
177         cat docbook-dtd${V}-sgml-1.0.catalog.patch | patch -Np0
178         cat docbook-dtd${V}-sgml-1.0.Makefile > Makefile
179         make install
180         install-catalog --add /etc/sgml/sgml-docbook-dtd${V}.cat /usr/share/sgml/docbook/sgml-dtd-${VERSION}/catalog
181         install-catalog --add /etc/sgml/sgml-docbook-dtd${V}.cat /etc/sgml/sgml-docbook.cat
184 docbook-dsssl (1.77)
185 Docbook DSSSL stylesheets.
187 * http://freshmeat.net/projects/docbook/
189 * http://download.sourceforge.net/docbook/docbook-dsssl-1.77.tar.gz
191         cat docbook-dsssl.Makefile > Makefile
192         if [ ! -z ${PREVIOUS} ]
193         then
194                 install-catalog --remove /etc/sgml/dsssl-docbook-stylesheets.cat /usr/share/sgml/docbook/dsssl-stylesheets-${PREVIOUS}/catalog
195                 install-catalog --remove /etc/sgml/sgml-docbook.cat /etc/sgml/dsssl-docbook-stylesheets.cat
196         fi
197         make VERSION=${VERSION} install
198         install-catalog --add /etc/sgml/dsssl-docbook-stylesheets.cat /usr/share/sgml/docbook/dsssl-stylesheets-${VERSION}/catalog
199         install-catalog --add /etc/sgml/sgml-docbook.cat /etc/sgml/dsssl-docbook-stylesheets.cat
202 docbook-xsl (1.54.1)
203 Docbook XSL stylesheets.
205 * http://freshmeat.net/projects/docbook/
207 * http://download.sourceforge.net/docbook/docbook-xsl-1.54.1.tar.gz
209         install -d /usr/share/sgml/docbook/xsl-stylesheets-${VERSION}
210         cp -af common extensions fo html htmlhelp images javahelp lib template xhtml /usr/share/sgml/docbook/xsl-stylesheets-${VERSION}
211         if [ ! -f /etc/xml/catalog ]; then mkdir /etc/xml; xmlcatalog --noout --create /etc/xml/catalog; fi
212         if [ ! -e /etc/xml/docbook ]; then xmlcatalog --noout --create /etc/xml/docbook; fi
213         xmlcatalog --noout --add "rewriteSystem" "http://docbook.sourceforge.net/release/xsl/1.45" "/usr/share/sgml/docbook/xsl-stylesheets-${VERSION}" /etc/xml/catalog
214         xmlcatalog --noout --add "rewriteURI" "http://docbook.sourceforge.net/release/xsl/1.45" "/usr/share/sgml/docbook/xsl-stylesheets-${VERSION}" /etc/xml/catalog
215         xmlcatalog --noout --add "rewriteSystem" "http://docbook.sourceforge.net/release/xsl/current" "/usr/share/sgml/docbook/xsl-stylesheets-${VERSION}" /etc/xml/catalog
216         xmlcatalog --noout --add "rewriteURI" "http://docbook.sourceforge.net/release/xsl/current" "/usr/share/sgml/docbook/xsl-stylesheets-${VERSION}" /etc/xml/catalog
217         xmlcatalog --noout --add "delegateSystem" "http://docbook.sourceforge.net/release/xsl/" "file:///etc/xml/docbook" /etc/xml/catalog
218         xmlcatalog --noout --add "delegateURI" "http://docbook.sourceforge.net/release/xsl/" "file:///etc/xml/docbook" /etc/xml/catalog
221 docbook-xml-dtd (4.1.2, 4.2)
222 Docbook XML DTD.
224 * http://freshmeat.net/projects/docbook/
226 * http://www.oasis-open.org/docbook/xml/4.1.2/docbkx412.zip
227 * http://www.oasis-open.org/docbook/xml/4.2/docbook-xml-4.2.zip
229         V=${VERSION/.}
230         XML_DTD_DIR=/usr/share/xml/docbook/xml-dtd-${VERSION}
231         ROOTCATALOG=/etc/xml/catalog
232         CATALOG=/etc/xml/docbook
233         install -d ${XML_DTD_DIR}
234         cp -af docbook.cat *.dtd ent/ *.mod ${XML_DTD_DIR}
235         if [ ! -e ${ROOTCATALOG} ]; then xmlcatalog --noout --create ${ROOTCATALOG}; fi
236         if [ ! -e ${CATALOG} ]; then xmlcatalog --noout --create ${CATALOG}; fi
237         xmlcatalog --noout --add "public" "-//OASIS//ELEMENTS DocBook XML Information Pool V${VERSION}//EN" "file://${XML_DTD_DIR}/dbpoolx.mod" $CATALOG
238         xmlcatalog --noout --add "public" "-//OASIS//DTD DocBook XML V${VERSION}//EN" "file://${XML_DTD_DIR}/docbookx.dtd" $CATALOG
239         xmlcatalog --noout --add "public" "-//OASIS//ENTITIES DocBook XML Character Entities V${VERSION}//EN" "file://${XML_DTD_DIR}/dbcentx.mod" $CATALOG
240         xmlcatalog --noout --add "public" "-//OASIS//ENTITIES DocBook XML Notations V${VERSION}//EN" "file://${XML_DTD_DIR}/dbnotnx.mod" $CATALOG
241         xmlcatalog --noout --add "public" "-//OASIS//ENTITIES DocBook XML Additional General Entities V${VERSION}//EN" "file://${XML_DTD_DIR}/dbgenent.mod" $CATALOG
242         xmlcatalog --noout --add "public" "-//OASIS//ELEMENTS DocBook XML Document Hierarchy V${VERSION}//EN" "file://${XML_DTD_DIR}/dbhierx.mod" $CATALOG
243         xmlcatalog --noout --add "public" "-//OASIS//DTD XML Exchange Table Model 19990315//EN" "file://${XML_DTD_DIR}/soextblx.dtd" $CATALOG
244         xmlcatalog --noout --add "public" "-//OASIS//DTD DocBook XML CALS Table Model V${VERSION}//EN" "file://${XML_DTD_DIR}/calstblx.dtd" $CATALOG
245         xmlcatalog --noout --add "rewriteSystem" "http://www.oasis-open.org/docbook/xml/${VERSION}" "file://${XML_DTD_DIR}" $CATALOG
246         xmlcatalog --noout --add "rewriteURI" "http://www.oasis-open.org/docbook/xml/${VERSION}" "file://${XML_DTD_DIR}" $CATALOG
247         xmlcatalog --noout --add "delegatePublic" "-//OASIS//ENTITIES DocBook XML" "file://$CATALOG" $ROOTCATALOG
248         xmlcatalog --noout --add "delegatePublic" "-//OASIS//DTD DocBook XML" "file://$CATALOG" $ROOTCATALOG
249         xmlcatalog --noout --add "delegateSystem" "http://www.oasis-open.org/docbook/" "file://$CATALOG" $ROOTCATALOG
250         xmlcatalog --noout --add "delegateURI" "http://www.oasis-open.org/docbook/" "file://$CATALOG" $ROOTCATALOG
251         xmlcatalog --noout --add "public" "ISO 8879:1986//ENTITIES Publishing//EN" "file://${XML_DTD_DIR}/ent/iso-pub.ent" $CATALOG
252         xmlcatalog --noout --add "public" "ISO 8879:1986//ENTITIES Greek Letters//EN" "file://${XML_DTD_DIR}/ent/iso-grk1.ent" $CATALOG
253         xmlcatalog --noout --add "public" "ISO 8879:1986//ENTITIES Box and Line Drawing//EN" "file://${XML_DTD_DIR}/ent/iso-box.ent" $CATALOG
254         xmlcatalog --noout --add "public" "ISO 8879:1986//ENTITIES Greek Symbols//EN" "file://${XML_DTD_DIR}/ent/iso-grk3.ent" $CATALOG
255         xmlcatalog --noout --add "public" "ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN" "file://${XML_DTD_DIR}/ent/iso-amsn.ent" $CATALOG
256         xmlcatalog --noout --add "public" "ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN" "file://${XML_DTD_DIR}/ent/iso-num.ent" $CATALOG
257         xmlcatalog --noout --add "public" "ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN" "file://${XML_DTD_DIR}/ent/iso-grk4.ent" $CATALOG
258         xmlcatalog --noout --add "public" "ISO 8879:1986//ENTITIES Diacritical Marks//EN" "file://${XML_DTD_DIR}/ent/iso-dia.ent" $CATALOG
259         xmlcatalog --noout --add "public" "ISO 8879:1986//ENTITIES Monotoniko Greek//EN" "file://${XML_DTD_DIR}/ent/iso-grk2.ent" $CATALOG
260         xmlcatalog --noout --add "public" "ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN" "file://${XML_DTD_DIR}/ent/iso-amsa.ent" $CATALOG
261         xmlcatalog --noout --add "public" "ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN" "file://${XML_DTD_DIR}/ent/iso-amso.ent" $CATALOG
262         xmlcatalog --noout --add "public" "ISO 8879:1986//ENTITIES Russian Cyrillic//EN" "file://${XML_DTD_DIR}/ent/iso-cyr1.ent" $CATALOG
263         xmlcatalog --noout --add "public" "ISO 8879:1986//ENTITIES General Technical//EN" "file://${XML_DTD_DIR}/ent/iso-tech.ent" $CATALOG
264         xmlcatalog --noout --add "public" "ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN" "file://${XML_DTD_DIR}/ent/iso-amsc.ent" $CATALOG
265         xmlcatalog --noout --add "public" "ISO 8879:1986//ENTITIES Added Latin 1//EN" "file://${XML_DTD_DIR}/ent/iso-lat1.ent" $CATALOG
266         xmlcatalog --noout --add "public" "ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN" "file://${XML_DTD_DIR}/ent/iso-amsb.ent" $CATALOG
267         xmlcatalog --noout --add "public" "ISO 8879:1986//ENTITIES Added Latin 2//EN" "file://${XML_DTD_DIR}/ent/iso-lat2.ent" $CATALOG
268         xmlcatalog --noout --add "public" "ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN" "file://${XML_DTD_DIR}/ent/iso-amsr.ent" $CATALOG
269         xmlcatalog --noout --add "public" "ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN" "file://${XML_DTD_DIR}/ent/iso-cyr2.ent" $CATALOG
270         xmlcatalog --noout --add "delegatePublic" "ISO 8879:1986" "file://$CATALOG" $ROOTCATALOG
273 docbook-xml-simple-dtd (4.1.2.5)
274 Docbook XML DTD Simplified (with fewer elements).
276 * http://freshmeat.net/projects/docbook/
278 * http://www.oasis-open.org/docbook/xml/simple/4.1.2.5/simple4125.zip
280         V=${VERSION/.}
281         V=${V/.}
282         V=${V/.}
283         XML_DTD_DIR=/usr/share/xml/docbook/xml-simple-dtd-${VERSION}
284         install -d ${XML_DTD_DIR}
285         cp -af *.css *.dtd *.mod ${XML_DTD_DIR}
288 scrollkeeper (0.3.11)
289 ScrollKeeper is a cataloging system for documentation on open systems. It
290 manages documentation metadata (as specified by the Open Source Metadata
291 Framework(OMF)) and provides a simple API to allow help browsers to find, sort,
292 and search the document catalog. It will also be able to communicate with
293 catalog servers on the Net to search for documents which are not on the local
294 system.
296 * http://freshmeat.net/projects/scrollkeeper/
298 * http://download.sourceforge.net/scrollkeeper/scrollkeeper-0.3.11.tar.gz
300         ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --disable-static --with-omfdirs=/usr/share/omf:/opt/gnome/share/omf:/opt/kde/share/omf
301         make
302         make install
303         xmlcatalog --noout --add "public" "-//OMF//DTD Scrollkeeper OMF Variant V1.0//EN" "/usr/share/xml/scrollkeeper/dtds/scrollkeeper-omf.dtd" /etc/xml/catalog
306 Following the approach mentioned in this hint, you can download and install more
307 catalogs as and when you find them appropriate for your needs. Additionally,
308 search for docbook at freshmeat.net for docbook realted tools and utilities.
310 Also check out the man pages for xmlcatalog and install-catalog. They specify
311 how to remove catalogs that are no longer needed (e.g. if you install a new
312 version and you need to remove the old one).
314 I am not an expert on SGML and this document is based on my findings trying to
315 install the prerequsites for GNOME-2. Hence there may be errors; if so please
316 let me know.
318 Some sites that may be of interest:
319 * http://www.docbook.org/
320 * http://www.tldp.org/HOWTO/DocBook-Demystification-HOWTO/index.html
321 * http://www.tldp.org/HOWTO/DocBook-OpenJade-SGML-XML-HOWTO/index.html
322 * http://www-106.ibm.com/developerworks/library/l-docbk.html
324 Don't forget to send me bug reports and enhancements so that I can keep the hint
325 updated.