XML Catalog files

XML Catalog files are used to provide an alternative path when the external entities are not accessible, or are not where the XML document specifies.

Code Editor recognizes XML documents and provides XML validation. Color coding, Smart Editing, and Code Completion features can be used with an XML file.

Many XML documents contain external links to stylesheets, schemas, DTDs, and so on, which may be stored on remote systems. If the links are absolute URLs, they only work when your network can reach them. However, the entity resolver of the XML SAX parser can be used to determine whether there is a local equivalent in your system's Catalog application level cache.

When you use an XML Catalog file to map these external references to local equivalents, the task of locating the reference is shifted from the XML documents to the XML Catalog files, which can be varied for different audiences. Since local copies of the references are accessed instead of remote network resources, and the local copy can be a subset of the complete schema or DTD in the external reference, XML processing may be faster.

The XML Catalog files to be used by Genero Studio are specified through the General Preferences.

Managing XML Catalog entries

Use Tools>>Preferences and select XML Schema/DTD from the Code Editor page in the Pages tree. A list of the XML catalog files to be used with Genero Studio is displayed.

You can add, edit, and delete entries for these catalog files through XML Schema/DTD Configuration.

XML Catalog specification

Genero Studio provides a subset of the OASIS XML catalog specification:

  • The catalog element to assign a name to the catalog
  • System and public elements to resolve DTDs
  • The uri element to resolve schema location for XSDs
  • The nextCatalog element to refer to another catalog file

Example File

This example illustrates the features of a Genero Studio XML Catalog file:

Figure: Genero Studio XML Catalog file


This figure is a screenshot of an XML catalog file. See the surrounding text for a description of the XML Elements.

The catalog element is the root of an XML Catalog. The xmlns attribute assigns a name to the catalog file.

Additional Elements in this file are:

  1. public - resolves a Public ID for an external DTD; specifies Public external DTDs intended for broad use (public distribution of a DTD file for a wider audience).
  2. system - resolves a relative system id for an external DTD; used to find the public DTD if it cannot be located by the public ID.
  3. system - resolves a web-based system id for an external DTD.
  4. uri - used to locate XSL and other files. It can be used for everything that is not a declared PUBLIC or SYSTEM identifier for a DTD or system entity file.
  5. nextCatalog - resolves entries related to Additional Catalogs.