swirl
Guide to OmniMark 7   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.

A submit action is not permitted in an sgml-error rule. It is permitted everywhere else.

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 ] [ LEGACYLIBRARIES ] [ ERRORS ]

OmniMark 7.1.2 Documentation Generated: June 28, 2005 at 5:45:47 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © Stilo Corporation, 1988-2005.