contentsconceptssyntaxlibrariessampleserrorsindex
Full text search
Cross-translations: general document translation
Prerequisite Concepts   Sample Code   Related Syntax  

A cross-translation converts documents from one arbitrary form to another. A cross-translation program does not make any use of the SGML parser.

A cross-translation program must start with cross-translate, and you must define all conversion events. To this end, OmniMark provides a rich language for specifying patterns to match text in the input. When text in the input matches a pattern, the associated rule is executed. OmniMark also provides a very expressive mechanism for saving the text matched by pieces of the pattern, so that the matched text can play a role in the actions that will be executed. OmniMark's pattern recognition capability is not limited by line boundaries, nor does it arbitrarily break up the text into fields. Because of this, cross-translation is a technique that applies to a wide range of data analysis and conversion tasks.

A cross-translation operates as follows:

  1. OmniMark examines each find rule in turn, looking for a rule that can match text at the current position. It selects the first such rule with no condition, or whose condition evaluates to true.
  2. If a rule is selected, the actions in the rule are performed in order, and those actions are responsible for outputting the "conversion" of the text matched by the pattern. If you want to use any of the matched text in an action, you can design the program to capture that text in pattern variables.
  3. If no rules can be selected, OmniMark allows text at the current point to "fall through" to the output; unrecognized data is output without being converted.
  4. The text that "fell through" or was matched is considered to be "consumed", and the cycle begins again with the text that follows.

Prerequisite Concepts
     Aided translation types
 
Sample Code
   Cross translations: a simple example
 
Related Syntax
   cross-translate
 
----

Top [CONTENTS] [CONCEPTS] [SYNTAX] [LIBRARIES] [SAMPLES] [ERRORS] [INDEX]

Generated: April 21, 1999 at 2:00:47 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © OmniMark Technologies Corporation, 1988-1999.