Table of Contents
This chapter describes the Debian hierarchical implementation of the OASIS XML Catalogs specification.
A catalog system provides a means to locate entities that are referenced in an XML document. A typical entity reference would be the external file defining the Document Type Definition (DTD) for the document in question. The DTD provides the grammar for the elements (tags) used in the document.
The reference to the DTD is part of the document prolog. A typical prolog for a DocBook XML document might look like
<?xml version="1.0"?> <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
Where the DTD is referenced by the optional Formal Public Identifier (FPI) defined by the PUBLIC keyword:
PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
and by the required System Identifier:
Another possible prolog for the same document might omit the FPI and use only the system identifier:
<?xml version="1.0"?> <!DOCTYPE book SYSTEM "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
The catalog system provides a means of locating the DTD by mapping these PUBLIC and SYSTEM identifiers to the external file which defines the DTD. A catalog-aware processing tool will then search the XML catalogs until it finds the statement that resolves one of the identifiers to the DTD file.
The processing tool will systematically search the catalog system until it locates the entity. By default it will first search the root catalog /etc/xml/catalog, which will then direct the lookup to the appropriate package catalog, /etc/xml/docbook-xml.xml. The package catalog will then direct the lookup to the appropriate local catalog, which in this case would be /usr/share/xml/docbook/schema/dtd/4.2/catalog.xml. This local catalog will provide the information needed to locate the external file defining the DTD, /usr/share/xml/docbook/schema/dtd/4.2/docbookx.dtd, in this example.
Optimize the Lookups: the only fully parsed catalog entry files should be the Local Catalogs associated with a given resource.
Provide Packaging Registration Tools: Developer tools should be provided that simplify the registration and deregistration of XML resources in the catalog system. These tools should therefore simplify the packaging of XML resources.