Arbortext Command Language > Hooks > keyrefResolveHook
  
keyrefResolveHook
keyrefResolveHook
 
Function prototype:
hook (key, type, oid, flag)
Synopsis
Use with:
add_hook(hookname, func[, prepend])
remove_hook(hookname, func)
where hookname is keyrefResolveHook.
This hook will be called any time the keyref or conkeyref attribute on an element in a DITA document is being resolved to an absolute reference.
* 
A legitimate value of an empty string must be distinguished from an error returned if the key cannot be resolved. If an empty string is to be returned, the special value of *ATI_EMPTY_STRING* should be returned. Returning an empty string "" indicates that the attribute cannot be resolved.
Arguments
key is the key name that is being resolved.
type is the type of reference that is being resolved. Valid values are keyref and conkeyref
oid is the object identifier (OID) of the element for which the attribute value is being resolved.
flag provides additional information about the type of resolution. If this is set to 0x001, that indicates the attribute is being used for publishing. If this is not set, that indicates the attribute is being used for editing.