Arbortext Command Language > Callbacks > doc_add_callback > include_path Callback Type
  
include_path Callback Type
Function prototype:
function funcname (doc, attrs[])
include_path is called when an XML inclusion section of a document is initially expanded.
Arguments:
doc — The identifier of the document containing the XML inclusion reference.
attrs[] — An associative array containing the attributes of the XML inclusion tag. Any values changed by the callback will be used instead of the original values if the callback returns -1.
Also refer to the entity_path callback type.
Following is an example of implementing the include_path callback type.
function my_include_path_callback(doc, attrs[])
{
local original_href = attrs['href'];
local new_href = original_href;
# possibly alter new_href here.
if (original_href != new_href)
{
attrs['href'] = new_href;
return -1; # force use of this new href
}
return 0; # continue as normal
}
doc_add_callback(doc, 'include_path', 'my_include_path_callback')