<?xml version="1.0" encoding="UTF-8"?>
<!--Arbortext, Inc., 1988-2010, v.4002-->
<!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN"
 "concept.dtd">
<concept id="xmlcatalog" xml:lang="en-us">
<title>XML Catalog</title>
<shortdesc>This is an introduction of XML catalog. </shortdesc>
<conbody>
<p>An <i>XML catalog</i>, which can be physically composed of several <i>catalog
entry files</i>, is a logical structure that describes mapping information
for various resources. A <i>catalog entry file</i> is an xml file
that includes a group of <i>catalog entries</i>. </p>
<p>A <i>catalog entry</i> can be used to locate a unified resource
identifier      (URI) reference for a certain resource such as a DTD
or Schema module. An external      entity's <i>public identifier</i> is
used for mapping to the URI reference.      </p>
<p>When the Public ID and System ID are both specified in a document,
and the Public ID is used to locate a resource, the URI of the System
identifier can be ignored.</p>
<section>     <title>Why use XML Catalog</title><p>XML Catalogs are
used to make the XML setup more flexible and portable.        Using
XML Catalogs, you can:<ul>
<li>Map from the logical names such as the public identifiers. The
           public identifier is safer and more stable to use to locate
a            specific file than the system identifier. Even if the
physical            location of the resource changes, you only need
to make revision            accordingly on the public identifier within
the catalog.</li>
<li> Move documents without changing references. If a document uses
another resource, and the location of the document changes, the Public
ID remains valid and the content is still valid.</li>
<li>Establish a local cache mechanism to locate the files associated
with           public identifiers or remote resources. With this mechanism
the delay            that occurs when locating remote resources can
be avoided. </li>
</ul>     </p>   </section>
<section>     <title>An XML Catalog Example</title>     <p>Here is
an example of a XML Catalog file.</p>     <p><b>Example 1. An XML
Catalog File:</b> <i>catalog-dita.xml</i>.</p>     <codeblock> &lt;?xml version="1.0" ?&gt; 
&lt;catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="public"&gt; 
  &lt;!-- Catalog for DITA --&gt;
  &lt;!-- DITA DTDs --&gt;
  &lt;group xml:base="dtd"&gt;
    &lt;public publicId="-//IBM//DTD DITA Concept//EN" uri="concept.dtd"/&gt;
    &lt;public publicId="-//IBM//ELEMENTS DITA Concept//EN" uri="concept.mod"/&gt;
  &lt;/group>
&lt;/catalog&gt;</codeblock>     <note>       <ol>
<li>The <tt>catalog</tt> element contains all other entries, and also
           includes a catalog namespace identifier. The attribute
of            <tt>prefer</tt> is set to <tt>public</tt>, which means
that the            public identifiers are used to resolve the catalog
before using the            system identifiers.</li>
<li>The group element is simply a wrapper element where the attributes
           such as <tt>xml:base</tt> are set. These attributes apply
to all            entries that are within the group content. The <tt>xml:base</tt> 
          attribute sets the main pathname prefix that all URIs are
located            relative to; so, in the example above, <filepath>concept.dtd</filepath> will
be found in the <filepath>dtd/</filepath> directory (relative to the
location of the catalog).</li>
</ol>     </note>   </section>
</conbody><?Pub Caret -1?>
</concept>
<?Pub *0000003515?>
