Arbortext Command Language > Hooks > completenesseventloghook
  
completenesseventloghook
completenesseventloghook
Function prototype:
function celhook(step, message, errorFlag, linkType, linkTarget, linkName)
Synopsis
If completeness checking is invoked via either the check_completeness command or the doc_incomplete() function with option 4 or 8 set, this hook will be called each time Arbortext Editor finds a completeness error, just before the error is written to the completeness check event log.
Arguments
step is the processing phase that produced the error:
1: completeness checking
2: markup checking
3: entity reference checking
4: ID and ID reference checking
5: schema check
6: table markup check
7: table markup warnings
message is the actual error message
errorFlag is 1 for errors and 0 for warnings
linkType is 1 if linkTarget is an OID, 2 if linkTarget is an ACL function
linkTarget is either an OID or an ACL function, as determined by linkType:
If it's an OID, it indicates the location in the document at which the error was located.
If it's an ACL function, it's a string that can be executed to obtain more information.
* 
The function will probably raise a dialog box, so this might not be useful if the programmer does not require UI components.
The hook function can return 0 or -1. If it returns -1, the message is written to the completeness checking event log. If the function returns 0, the message is discarded and not written anywhere.