XML technologies / DocBook / XML catalogs / XML catalogs creation
(Excerpt from "DocBook-XML: Media-neutral and platform-independent publishing" by Thomas Schraitle)
You can create a catalog file manually or automatically with the program xmlcatalog (package libxml2). Create an empty catalog catalog.xml as follows:
xmlcatalog --noout --create catalog.xml Add new entries with the option --add. Specify the type (public, system, …), the original string/URI and the replacement text:
xmlcatalog --add public \
"-//OASIS//DTD DocBook XML V4.5//EN" \
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" \
catalog.xmlThe option -add allows only the types public, system, rewriteSystem, delegatePublic or delegateSystem. After the command, the file catalog.xml looks as follows:
<xml version="1.0"?>
<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<public publicId="-//OASIS//DTD DocBook XML V4.5//EN" uri="http://www.docbook.org/xml/4.5/docbookx.dtd"/>
</catalog>To remove an entry, invoke xmlcatalog with the option --del:
xmlcatalog--del \
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" \
catalog.xmlThis command removes an entry that matches the supplied string exactly (case-sensitive!).
The command xmlcatalog is well suited to editing catalog files in scripts without knowing their exact format.
Copyright © 2009 Millin Verlag
You may print the online version for your private use.
Otherwise, this chapter from "DocBook-XML: Medienneutrales und plattformunabhängiges Publizieren" is subject to the same provisions as the printed edition: the work, including all its parts, is protected by copyright. All rights are reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
Millin Verlag, Siebengebirgsring 36, 53797 Lohmar, info(at)millin.de
back to top