-
Notifications
You must be signed in to change notification settings - Fork 6
DocBookAndXmlCatalogs
XML catalogs are used to make an XML parser or an XSLT engine "catalog aware", so that it will always use local copies of DTDs or XSLT stylesheets -- without you needing to hard-code local paths in all your documents and stylesheets.
As part of his book DocBook XSL: The Complete Guide, BobStayton has written some detailed how-to information on using XML catalogs with DocBook. That should be your first stop.
DanielVeillard (creator of libxml2 and the xsltproc XSLT
engine) has written an excellent XML Catalog introduction.
The XML Catalogs specification is an OASIS standard.
The OASIS Entity Resolution Technical Committee maintains a FAQ.
XML Catalogs are fully supported in libxml2. The distribution includes a command-line utility,
xmlcatalog, for creating, parsing, and manipulating XML Catalog files (as well as SGML Open/OASIS catalog files). There is also a specific shell script
for generating XML Catalogs for DocBook 4.1.2, as well as a tar file with some ready-made XML Catalogs for DocBook.
NormanWalsh developed Java Resolver classes at Sun Microsystems and later contributed them to the xml-commons area of the Apache XML project. The Resolver classes enable you to use XML catalogs with XML applications (such as XSLT engines) written in Java.
A few things to note:
-
You can grab the latest Resolver distribution from the xml-commons downloads directory (or from a mirror). The latest version is 1.2, from November 2006 (Release notes).
-
The resolver.jar file in the Resolver distribution is actually the only thing you need (you can safely ignore the rest of the stuff).
-
The original Sun package names were different from the ones used in the Apache Commons version. This only concerns users who want to move from the Sun version to the Apache version.
If you want to get started using XML Catalogs with Saxon or another XSLT engine, then read Norm's XML Entity and URI Resolvers article. It includes:
- Understanding Catalog Files: outlines the XML Catalogs file format
- Controlling the Catalog Resolver: explains how to set configuration properties for the Resolver classes
- Using Catalogs with Popular Applications: explains how to use the Resolver classes with Saxon, Xalan, XP, and XT
This chapter in the Ant manual explains how to use XML catalogs in Ant build files.