swirl
Guide to OmniMark 8   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
  Related Syntax   Related Concepts  
action  

submit

 
 

Syntax

submit string-expression


Purpose

The submit action supplies the result of evaluating the specified string-expression as input to the find rules.

submit never invokes find-start or find-end rules on the submitted input. Any initialization required can be done before the submit action, and any cleanup can be done after it returns. If the same submit action must be done in a number of places in the program, it can be placed in a function.

The consequence of performing a submit while in a find-start rule (or in an external-text-entity rule which was triggered by input written to the #markup-parser stream inside a find-start rule) is that find rules may execute before all of the find-start rules have been processed. The programmer should ensure that any initialization required by those find rules must be complete before the submit action is performed.

Similarly, a submit action in a find-end rule may cause find rules to fire. Any cleanup required by those find rules must be done after the submit action returns.

In OmniMark 8, submit action is permitted in an markup-error rule.

Often, submit is used to apply the find rules to the contents of files determined by the program. In those cases, the keyword file is added to the syntax (following submit), and the string-expression is used as the name of the file.

When submit is invoked on a file, it causes this chain of events:

  1. OmniMark suspends current processing.
  2. The named file is opened.
  3. find rules are immediately applied to the content of the named file, inputting data from the file as needed.
  4. When the entire input has been processed, OmniMark closes the file and resumes the suspended processing.

    Related Syntax
   external-text-entity
   file
   find
   find-end
   find-start
 
Related Concepts
   Input
 
 

Top [ INDEX ] [ CONCEPTS ] [ TASKS ] [ SYNTAX ] [ LIBRARIES ] [ LEGACY LIBRARIES ] [ ERRORS ]

OmniMark 8.2.0 Documentation Generated: March 13, 2008 at 3:33:48 pm
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2008.