Author: Richard Johnson
Keywords: setting up a working environment, authoring tool, editor (authoring tool), catalog, configuring to use the catalog, catalog, configuring your authoring tool to use

# Configuring your authoring tool to use the Toolkit catalog

"DITA-aware" authoring tools check source files for well-formedness and validate them against DTDs. However, you may need to configure your editor to enable it to do these tasks correctly. Some editors have a built-in copy of the DTDs; others require that you provide a catalog that can be used to look up DTD definitions specified in your source file DOCTYPE declaration. Some versions of Altova XMLSpy may require a catalog.

XMLSpy performs a catalog lookup on the PUBLIC identifier in the DOCTYPE declaration in DITA source files. If it does not find a match in its catalog, XMLSpy tries to open the disk file specified as the last URI in the DOCTYPE declaration. If the URI does not point to the relevant DTD, XMLSpy is unable to validate the DITA source file.

By modifying XMLSpy's CustomCatalog.xml file, you can move your source files to a new location without having to worry about incorrect URIs in your DITA source files.

Follow these steps to modify C:\Program Files\Altova\XMLSpy2006/CustomCatalog.xml.

1. Save the CustomCatalog.xml stub file under a new name (for example, CustomCatalogOLD.xml).
2. Open the CustomCatalog.xml stub file.

       <?xml version="1.0" encoding="UTF-8"?>
       <!-- edited with XML Spy v5 beta 1 U (http://www.xmlspy.com) by Vladislav Gavrielov (Altova) -->
       <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="urn:oasis:names:tc:entity:xmlns:xml:catalog
       Catalog.xsd"/>

3. Keeping the CustomCatalog.xml stub file open, also open catalog-dita.xml in the Toolkit home directory.

       <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="public">

       <group xml:base="dtd">

       <public publicId="-//IBM//DTD DITA Concept//EN" uri="dita132/concept.dtd"></public>
       <public publicId="-//IBM//ELEMENTS DITA Concept//EN" uri="dita132/concept.mod"></public>

       <public publicId="-//IBM//DTD DITA Composite//EN" uri="dita132/ditabase.dtd"></public>

       <public publicId="-//IBM//DTD DITA Reference//EN" uri="dita132/reference.dtd"></public>
       <public publicId="-//IBM//ELEMENTS DITA Reference//EN" uri="dita132/reference.mod"></public>
       . . .

4. In catalog-dita.xml, change the relative path names to absolute path names.

       <?xml version="1.0" encoding="UTF-8"?>
       <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"   \
       xsi:schemaLocation="urn:oasis:names:tc:entity:xmlns:xml:catalog
       Catalog.xsd">

       <!-- XMLSPY custom XML catalog for DITA DTDs -->

       <public publicId="-//IBM//DTD DITA Concept//EN" uri="C:/ditaot/dtd/dita132/concept.dtd"></public>
       <public publicId="-//IBM//ELEMENTS DITA Concept//EN" uri="C:/ditaot/dtd/dita132/concept.mod"></public>

       <public publicId="-//IBM//DTD DITA Composite//EN" uri="C:/ditaot/dtd/dita132/ditabase.dtd"></public>

       <public publicId="-//IBM//DTD DITA Reference//EN" uri="C:/ditaot/dtd/dita132/reference.dtd"></public>
       <public publicId="-//IBM//ELEMENTS DITA Reference//EN" uri="C:/ditaot/dtd/dita132/reference.mod"></public>
       . . .

5. Modify the CustomCatalog.xml file and paste the new information into it.

       <?xml version="1.0" encoding="UTF-8"?>
       <!-- edited with XML Spy v5 beta 1 U (http://www.xmlspy.com) by Vladislav Gavrielov (Altova) -->
       <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:oasis:names:tc:entity:xmlns:xml:catalog
       [Modify below]
       Catalog.xsd">

       [Paste here]

       </catalog>

6. Save the CustomCatalog.xml file.

The following is a complete sample CustomCatalog.xml created using this procedure.

    <?xml version="1.0" encoding="UTF-8"?>
    <!-- edited with XML Spy v5 beta 1 U (http://www.xmlspy.com) by Vladislav Gavrielov (Altova) -->
    <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:oasis:names:tc:entity:xmlns:xml:catalog
    Catalog.xsd">

     <!-- XMLSPY custom XML catalog for DITA 1.1 DTDs -->

      <public publicId="-//IBM//DTD DITA Concept//EN" uri="C:/DITA-OT1.3.1-full/dtd/dita132/concept.dtd"></public>
      <public publicId="-//IBM//ELEMENTS DITA Concept//EN" uri="C:/DITA-OT1.3.1-full/dtd/dita132/concept.mod"></public>

      <public publicId="-//IBM//DTD DITA Composite//EN" uri="C:/DITA-OT1.3.1-full/dtd/dita132/ditabase.dtd"></public>

      <public publicId="-//IBM//DTD DITA Reference//EN" uri="C:/DITA-OT1.3.1-full/dtd/dita132/reference.dtd"></public>
      <public publicId="-//IBM//ELEMENTS DITA Reference//EN" uri="C:/DITA-OT1.3.1-full/dtd/dita132/reference.mod"></public>

      <public publicId="-//IBM//DTD DITA Task//EN" uri="C:/DITA-OT1.3.1-full/dtd/dita132/task.dtd"></public>
      <public publicId="-//IBM//ELEMENTS DITA Task//EN" uri="C:/DITA-OT1.3.1-full/dtd/dita132/task.mod"></public>

      <public publicId="-//IBM//DTD DITA Topic//EN" uri="C:/DITA-OT1.3.1-full/dtd/dita132/topic.dtd"></public>
      <public publicId="-//IBM//ELEMENTS DITA Topic//EN" uri="C:/DITA-OT1.3.1-full/dtd/dita132/topic.mod"></public>
      <public publicId="-//IBM//ENTITIES DITA Topic Class//EN" uri="C:/DITA-OT1.3.1-full/dtd/dita132/topic_class.ent"></public>
      <public publicId="-//IBM//ENTITIES DITA Topic Definitions//EN" uri="C:/DITA-OT1.3.1-full/dtd/dita132/topic_defn.ent"></public>

      <public publicId="-//IBM//DTD DITA Map//EN" uri="C:/DITA-OT1.3.1-full/dtd/dita132/map.dtd"></public>
      <public publicId="-//IBM//ELEMENTS DITA Map//EN" uri="C:/DITA-OT1.3.1-full/dtd/dita132/map.mod"></public>
      <public publicId="-//IBM//ENTITIES DITA Map Group Domain//EN" uri="C:/DITA-OT1.3.1-full/dtd/dita132/mapgroup.ent"></public>
      <public publicId="-//IBM//ELEMENTS DITA Map Group Domain//EN" uri="C:/DITA-OT1.3.1-full/dtd/dita132/mapgroup.mod"></public>

      <public publicId="-//IBM//ELEMENTS DITA Highlight Domain//EN" uri="C:/DITA-OT1.3.1-full/dtd/dita132/highlight-domain.mod"></public>
      <public publicId="-//IBM//ENTITIES DITA Highlight Domain//EN" uri="C:/DITA-OT1.3.1-full/dtd/dita132/highlight-domain.ent"></public>

      <public publicId="-//IBM//ELEMENTS DITA Programming Domain//EN" uri="C:/DITA-OT1.3.1-full/dtd/dita132/programming-domain.mod"></public>
      <public publicId="-//IBM//ENTITIES DITA Programming Domain//EN" uri="C:/DITA-OT1.3.1-full/dtd/dita132/programming-domain.ent"></public>

      <public publicId="-//IBM//ELEMENTS DITA Software Domain//EN" uri="C:/DITA-OT1.3.1-full/dtd/dita132/software-domain.mod"></public>
      <public publicId="-//IBM//ENTITIES DITA Software Domain//EN" uri="C:/DITA-OT1.3.1-full/dtd/dita132/software-domain.ent"></public>

      <public publicId="-//IBM//ELEMENTS DITA User Interface Domain//EN" uri="C:/DITA-OT1.3.1-full/dtd/dita132/ui-domain.mod"></public>
      <public publicId="-//IBM//ENTITIES DITA User Interface Domain//EN" uri="C:/DITA-OT1.3.1-full/dtd/dita132/ui-domain.ent"></public>

      <public publicId="-//IBM//ELEMENTS DITA Utilities Domain//EN" uri="C:/DITA-OT1.3.1-full/dtd/dita132/utilities-domain.mod"></public>
      <public publicId="-//IBM//ENTITIES DITA Utilities Domain//EN" uri="C:/DITA-OT1.3.1-full/dtd/dita132/utilities-domain.ent"></public>

      <public publicId="-//IBM//ELEMENTS DITA Metadata//EN" uri="C:/DITA-OT1.3.1-full/dtd/dita132/meta_xml.mod"></public>
      <public publicId="-//IBM//ELEMENTS DITA CALS Tables//EN" uri="C:/DITA-OT1.3.1-full/dtd/dita132/tbl_xml.mod"></public>

      <public publicId="-//OASIS//DTD DITA Concept//EN" uri="C:/DITA-OT1.3.1-full/dtd/concept.dtd"></public>
      <public publicId="-//OASIS//ELEMENTS DITA Concept//EN" uri="C:/DITA-OT1.3.1-full/dtd/concept.mod"></public>

      <public publicId="-//OASIS//DTD DITA Composite//EN" uri="C:/DITA-OT1.3.1-full/dtd/ditabase.dtd"></public>

      <public publicId="-//OASIS//DTD DITA Glossary//EN" uri="C:/DITA-OT1.3.1-full/dtd/glossary.dtd"></public>
      <public publicId="-//OASIS//ELEMENTS DITA Glossary//EN" uri="C:/DITA-OT1.3.1-full/dtd/glossary.mod"></public>

      <public publicId="-//OASIS//DTD DITA Reference//EN" uri="C:/DITA-OT1.3.1-full/dtd/reference.dtd"></public>
      <public publicId="-//OASIS//ELEMENTS DITA Reference//EN" uri="C:/DITA-OT1.3.1-full/dtd/reference.mod"></public>

      <public publicId="-//OASIS//DTD DITA Task//EN" uri="C:/DITA-OT1.3.1-full/dtd/task.dtd"></public>
      <public publicId="-//OASIS//ELEMENTS DITA Task//EN" uri="C:/DITA-OT1.3.1-full/dtd/task.mod"></public>

      <public publicId="-//OASIS//DTD DITA Topic//EN" uri="C:/DITA-OT1.3.1-full/dtd/topic.dtd"></public>
      <public publicId="-//OASIS//ELEMENTS DITA Topic//EN" uri="C:/DITA-OT1.3.1-full/dtd/topic.mod"></public>
      <public publicId="-//OASIS//ENTITIES DITA Topic Class//EN" uri="C:/DITA-OT1.3.1-full/dtd/topicAttr.mod"></public>
      <public publicId="-//OASIS//ENTITIES DITA Topic Definitions//EN" uri="C:/DITA-OT1.3.1-full/dtd/topicDefn.ent"></public>

      <public publicId="-//OASIS//DTD DITA Map//EN" uri="C:/DITA-OT1.3.1-full/dtd/map.dtd"></public>
      <public publicId="-//OASIS//ELEMENTS DITA Map//EN" uri="C:/DITA-OT1.3.1-full/dtd/map.mod"></public>
      <public publicId="-//OASIS//ENTITIES DITA Map Group Domain//EN" uri="C:/DITA-OT1.3.1-full/dtd/mapGroup.ent"></public>
      <public publicId="-//OASIS//ELEMENTS DITA Map Group Domain//EN" uri="C:/DITA-OT1.3.1-full/dtd/mapGroup.mod"></public>

      <public publicId="-//OASIS//DTD DITA BookMap//EN" uri="C:/DITA-OT1.3.1-full/dtd/bookmap.dtd"></public>
      <public publicId="-//OASIS//ELEMENTS DITA BookMap//EN" uri="C:/DITA-OT1.3.1-full/dtd/bookmap.mod"></public>

      <public publicId="-//OASIS//ELEMENTS DITA Highlight Domain//EN" uri="C:/DITA-OT1.3.1-full/dtd/highlightDomain.mod"></public>
      <public publicId="-//OASIS//ENTITIES DITA Highlight Domain//EN" uri="C:/DITA-OT1.3.1-full/dtd/highlightDomain.ent"></public>

      <public publicId="-//OASIS//ELEMENTS DITA Indexing Domain//EN" uri="C:/DITA-OT1.3.1-full/dtd/indexingDomain.mod"></public>
      <public publicId="-//OASIS//ENTITIES DITA Indexing Domain//EN" uri="C:/DITA-OT1.3.1-full/dtd/indexingDomain.ent"></public>

      <public publicId="-//OASIS//ELEMENTS DITA Programming Domain//EN" uri="C:/DITA-OT1.3.1-full/dtd/programmingDomain.mod"></public>
      <public publicId="-//OASIS//ENTITIES DITA Programming Domain//EN" uri="C:/DITA-OT1.3.1-full/dtd/programmingDomain.ent"></public>

      <public publicId="-//OASIS//ELEMENTS DITA Software Domain//EN" uri="C:/DITA-OT1.3.1-full/dtd/softwareDomain.mod"></public>
      <public publicId="-//OASIS//ENTITIES DITA Software Domain//EN" uri="C:/DITA-OT1.3.1-full/dtd/softwareDomain.ent"></public>

      <public publicId="-//OASIS//ELEMENTS DITA User Interface Domain//EN" uri="C:/DITA-OT1.3.1-full/dtd/uiDomain.mod"></public>
      <public publicId="-//OASIS//ENTITIES DITA User Interface Domain//EN" uri="C:/DITA-OT1.3.1-full/dtd/uiDomain.ent"></public>

      <public publicId="-//OASIS//ELEMENTS DITA Utilities Domain//EN" uri="C:/DITA-OT1.3.1-full/dtd/utilitiesDomain.mod"></public>
      <public publicId="-//OASIS//ENTITIES DITA Utilities Domain//EN" uri="C:/DITA-OT1.3.1-full/dtd/utilitiesDomain.ent"></public>

      <public publicId="-//OASIS//ELEMENTS DITA XNAL Domain//EN" uri="C:/DITA-OT1.3.1-full/dtd/xnalDomain.mod"></public>
      <public publicId="-//OASIS//ENTITIES DITA XNAL Domain//EN" uri="C:/DITA-OT1.3.1-full/dtd/xnalDomain.ent"></public>

      <public publicId="-//OASIS//ELEMENTS DITA Common Elements//EN" uri="C:/DITA-OT1.3.1-full/dtd/commonElements.mod"></public>
      <public publicId="-//OASIS//ENTITIES DITA Common Elements//EN" uri="C:/DITA-OT1.3.1-full/dtd/commonElements.ent"></public>
      <public publicId="-//OASIS//ELEMENTS DITA Metadata//EN" uri="C:/DITA-OT1.3.1-full/dtd/metaDecl.mod"></public>
      <public publicId="-//OASIS//ELEMENTS DITA CALS Tables//EN" uri="C:/DITA-OT1.3.1-full/dtd/tblDecl.mod"></public>
      <public publicId="-//OASIS//ELEMENTS DITA Exchange Table Model//EN" uri="C:/DITA-OT1.3.1-full/dtd/tblDecl.mod"></public>

      <public publicId="-//IBM//DTD DITA Element Reference//EN" uri="C:/DITA-OT1.3.1-full/dtd/demo/elementref/elementref_shell.dtd"></public>
      <public publicId="-//IBM//ELEMENTS DITA Element Reference//EN" uri="C:/DITA-OT1.3.1-full/dtd/demo/elementref/elementref.mod"></public>

      <public publicId="-//IBM//DTD DITA FAQ//EN" uri="C:/DITA-OT1.3.1-full/dtd/demo/faq/faq_shell.dtd"></public>
      <public publicId="-//IBM//ELEMENTS DITA FAQ//EN" uri="C:/DITA-OT1.3.1-full/dtd/demo/faq/faq.mod"></public>

      <public publicId="-//IBM//DTD DITA eNote//EN" uri="C:/DITA-OT1.3.1-full/dtd/demo/enote/enote_shell.dtd"></public>
      <public publicId="-//IBM//ELEMENTS DITA eNote//EN" uri="C:/DITA-OT1.3.1-full/dtd/demo/enote/enote.mod"></public>

      <public publicId="-//IBM//DTD DITA BookMap//EN" uri="C:/DITA-OT1.3.1-full/demo/book/bookmap.dtd"></public>
      <public publicId="-//IBM//ELEMENTS DITA BookMap//EN" uri="C:/DITA-OT1.3.1-full/demo/book/bookmap.mod"></public>

      <public publicId="-//IBM//DTD DITA Book Information//EN" uri="C:/DITA-OT1.3.1-full/demo/book/bkinfo.dtd"></public>
      <public publicId="-//IBM//ELEMENTS DITA Book Information//EN" uri="C:/DITA-OT1.3.1-full/demo/book/bkinfo.mod"></public>

    </catalog>

For more detailed information about creating an XMLSpy catalog for DITA DTDs, see http://www.altova.com/manual2006/xmlspy/spyprofessional/index.html?validate.htm.