This function provides an interface to use XML catalogs within templates (see "About XML Catalogs" below).

The uri parameter specifies an URI (or system identifier) to be resolved.

When this is an absolute URI (it has a scheme component), the function returns the mapping of that URI in the loaded XML catalog(s). If no mapping exists, the original URI is returned.

When the passed string is a relative URI and the contextURI parameter is also specified, the initial URI will be resolved against the context URI and the result returned by the function.

Otherwise, the function will return the original value of the uri parameter.

Parameters:

uri

The initial URI to be resolved. This may be either Only an absolute URI will be passed to the XML catalog resolver. If no catalog mapping exists for that URI, it will be returned back as the function result.
contextURI
Specify the context URI against which a relative URI (passed in uri parameter) will be resolved.

The value passed in this parameter must be either an absolute URI or a local file pathname (which will be converted to the absolute URL).

The context URI must be already resolved. It will not be passed to the XML catalog resolver before using it!

Returns:

The resolved (absolute) URI or, if resolution failed, the original value of the uri parameter.

About XML Catalogs

XML catalogs are special XML files that map URIs (external system identifier) to other URIs (normally, physical URLs). DocFlex/XML supports XML catalogs in OASIS XML Catalogs v1.1 format.

You can specify the locations of XML catalog files (both local file pathnames and absolute URLs) either in the generator GUI or on the command line using -xmlcatalog option.

Once specified, the XML catalog files will be loaded the first before processing of the data source XML files.