This sample shows a how to configure the default catalog resolver for use with the command-line tool and the PipelinedComparatorS9 API. This document describes the concepts behind the use of a catalog resolver. For the resources associated with this sample, see here for Java and here for .NET
2. OASIS Catalog Support
The XML Compare product is shipped with a slightly customized variant of the Apache commons OASIS catalog resolver - version 1.2, which fixes some of the published bugs and provides an enhancement for locating resolvable entities using Java's resource loading mechanism. Details of this customization are on our catalog resolver page.
3. Locating the catalogs
The provided catalog resolver reads the Java
xml.catalog.files system property to determine where the catalogs are located. This can be achieved by
- setting the system property in the source code,
- supplying a JVM (Java Virtual Machine) argument, or
- reading a DeltaXML configuration properties file.
The first of the techniques used to set the Java
xml.catalog.files property is used, unless technique (1) is used after the call to setup the default DeltaXML catalog support; hence, technique (1) should be applied before any invocation of either a Catalog or DeltaXML method.
Note that if the
xml.catalog.files system property is not set then the "catalogs" entry in a Apache commons CatalogManager.properties file is used instead.
4. Running the Sample
The resources for this sample can be downloaded from here for Java and here for .NET. Instructions for running the sample are in the README.md file, displayed below the source in Bitbucket. The resources should be checked-out, cloned or downloaded and unzipped into the samples directory of the XML Compare release. The resources should be located such that they are two levels below the top level release directory, for example
5. Further information
The general DeltaXML's configuration properties documentation for how properties can be specified in general.
The Javadoc comments in FilesWithCatalog.java contain further implementation specific details.
Useful catalog resources:
If you want to use a file URI that is a local path to your catalog file, you must take care to specify the URI using the correct form, as specified in IETF RFC 8089 - the file URI scheme