Detecting Errors

Detect configuration issues by isolating the problem.

The XML Catalogs Standard requires that the processors recover from any resource failures and continue, therefore the XML Catalog API ignores any failed catalog entry files without issuing an error, which makes it harder to detect configuration issues.

Dectecting Configuration Issues

To detect configuration issues, isolate the issues by setting one catalog at a time, setting the RESOLVE value to strict, and checking for a CatalogException exception when no match is found.

Table 4-1 RESOLVE Settings

RESOLVE Value CatalogResolver Behavior Description

strict (default)

Throws a CatalogException if no match is found with a specified reference

An unmatched reference may indicate a possible error in the catalog or in setting the catalog.

continue

Returns quietly

This is useful in a production environment where you want the XML processors to continue resolving any external references not covered by the catalog.

ignore

Returns quietly

For processors such as SAX, that allow skipping the external references, the ignore value instructs the CatalogResolver object to return an empty InputSource object, thus skipping the external reference.