Using a local XML Catalog file in Oxygen

Much of my day job requires a good technical understanding of XML files, including schema validation. I came across a recent GitHub post that briefly mentioned using the Oxygen XML Catalog file to bind a xsi:schemaLocation namespace declaration to a local schema file. I find the local schema files invaluable when using bad (or zero) Internet connections, which are much more secure. Using the XML Catalog file makes it simple to tell Oxygen that it should always use the local schemas when possible. Here are the steps I followed to add the XML Catalog file to my local instance of Oxygen (XML Editor 23.1 as of this posting).

Step 1: Create an XML Catalog

The simplest way of creating an XML Catalog file is to open a new XML document instance in Oxygen under the File > New menu item. When doing so, you will want to select the entry for Oasis XML Catalog:

Creating a new XML Catalog file.

Step 2: Add your schema locations to the XML Catalog

The default XML Catalog template fills in several optional catalog entries as examples. I deleted those that were not relevant to this particulate catalog (including the comments) and added the entries for the mappings I required:

New schema mapping in my XML Catalog.

Once complete, I saved the XML Catalog to my local file system for the next step.

Step 3: Add the XML Catalog to the active list of XML Catalogs

Under the Options > Preferences menu, select the XML > XML Catalog submenu, check the Process "schemaLocation" namespaces through URI mappings for XML Schema box, add your new XML Catalog file to the list of Catalogs, and then select OK:

Adding you renew XML Catalog to the list of XML Catalog files.

Once done, your instance of Oxygen will use the locally defined schema location mappings if they match the xsi:schemaLocation target.