| Syntax 
   submit string-expression
 
 Purpose
 
 The submitaction supplies the result of evaluating the specified string-expression as input to thefindrules. submitnever invokesfind-startorfind-endrules on the submitted input. Any initialization required can be done before thesubmitaction, and any cleanup can be done after it returns. If the samesubmitaction must be done in a number of places in the program, it can be placed in a function.
 The consequence of performing a submitwhile in afind-startrule (or in anexternal-text-entityrule which was triggered by input written to the#sgmlstream inside afind-startrule) is thatfindrules may execute before all of thefind-startrules have been processed. The programmer should ensure that any initialization required by thosefindrules must be complete before thesubmitaction is performed. Similarly, a submitaction in afind-endrule may causefindrules to fire. Any cleanup required by thosefindrules must be done after thesubmitaction returns. A submitaction is not permitted in ansgml-errorrule. It is permitted everywhere else. Often, submitis used to apply thefindrules to the contents of files determined by the program. In those cases, the keywordfileis added to the syntax (followingsubmit), and the string-expression is used as the name of the file. When submitis invoked on a file, it causes this chain of events: OmniMark suspends current processing.
The named file is opened.
findrules are immediately applied to the content of the named file, inputting data from the file as needed.When the entire input has been processed, OmniMark closes the file and resumes the suspended processing.
 |