Arbortext Command Language > Functions by Alphabetical Listing > ditaref_resolve
  
ditaref_resolve
path=ditaref_resolve (path, oid[, attrname])
This function resolves a reference to content in a DITA document and returns the path where the referenced content is located.
The path parameter is the file path or file name you want to resolve. The value of path can be a file name, an absolute or relative path, a URI, or a Logical ID. If the value of path is a relative path, it is resolved against the following directories in this order:
The base URI for oid, if any.
The directories in the DITA references path, if any.
The URI entries in the catalog path.
The URI entries in the catalog path are also checked for the path value in the following cases:
The path value is an absolute file path to a file that does not exist.
The path value is a content management system Logical ID or fully qualified URL.
If you want to have path resolved against the document directory and the DITA references path (shown in the File Locations category of the Preferences dialog box), but not the base URI, use the oid of the base element in the document. If you want to have path resolved against the values in the DITA references path, but not the base URI or the document directory, use oid_null() as the value of oid. The symbolic parameter %^ in the DITA references path will also prevent the base URI and document directory from being used to resolve path.
The oid parameter specifies the context in which path should be resolved. The context includes any base URI associated with the oid and the document directory for the document that contains the oid.
The optional attrname parameter is the name of the attribute that contains the path value being resolved.
The returned path is the resolved path name and is usually an absolute path. If path is a relative path and cannot be resolved, the returned path is one of the following values:
The absolute path for path in the base URI directory, if one exists.
The absolute path for path in the document directory, if one exists.
The value of path, if there is no base URI or document directory.
An empty string, if oid_null() is used as the value of oid.
Related Topics
set ditapath command
oid_null function
Symbolic parameters in path list variables
reference_path callback type