When your program runs, all
process-start rules are performed in the order in which they occur in the program, followed by all
process rules, in the order in which they occur, followed by all
process-end rules. (Naturally, find or markup rules invoked as a result of code in any of the process-start, process, or process-end rules will also fire, as appropriate, in this sequence.)
You can do anything in a
process-end rule that you can do in a
process rule, however, as a matter of practice,
process-end rules are intended specifically for initialization and termination code. They are particularly useful in include files where you need to have code in the include file execute before the main program code executes.
OmniMark also supports two other pairs of initialization and termination rules,
document-end. These rules are supported for compatibility with older versions of OmniMark. In new code, you should use
process-end rules for initialization and termination code.
The order of execution of these rules is: