XML technologies / DocBook / XML catalogs / Why use catalogs?

(Excerpt from "DocBook-XML: Media-neutral and platform-independent publishing" by Thomas Schraitle)

Accessing resources through a path raises several difficulties:

Catalogs solve these problems. They make your XML environment adaptable, mainly for the following reasons:

Processing speed

In simple terms, XML catalogs replace Internet addresses with operating-system-specific paths. The resource is then loaded from your local hard disk, increasing processing speed, provided that you have a local copy.

Portability

Processing XML documents on different operating systems causes difficulties due to different paths or unfamiliar syntax. Generic URIs move the operating-system-specific part into catalogs and reduce these problems when exchanging documents.

Centralization

Catalogs give you one central location for configuring generic URIs for all your XML files and documents.

These features make catalogs useful in several interesting scenarios:

An XML catalog has the following structure:

 

Example: Structure of an XML catalog

<?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">
  <!-- Einträge -->
</catalog> 

Line 2: The optional DOCTYPE declaration. Some XML parsers have the catalog DTD built in and do not need an Internet connection. If errors occur, remove the DOCTYPE declaration.
Line 3: The root element catalog is bound to the namespace urn:oasis:names:tc:entity:xmlns:xml:catalog.
Line 4: Insert your entries here to rewrite URIs as the corresponding paths.

  

back to top