|
|||||
|
|||||
Prerequisite Concepts | Related Syntax | ||||
Aided translation types |
The use of aided translation types is deprecated, but is supported for compatibility with earlier versions of OmniMark.
If you are building filters or other types of batch translation programs, you can use OmniMark's aided translation types to simplify your code.
The submit
, do sgml-parse
, and do xml-parse
actions allow you to direct input to scanned or parsed within a normal OmniMark program. The using output as
and output-to
actions let you control where your output will go. Aided translation types simplify matters by automatically scanning or parsing input from a source specified on the OmniMark command line, and outputting directly to the destination appropriate for the type of translation.
The cross-translate
translation type is used for conventional processing chores. It sends input directly to find rules; output goes directly to #main-output
.
The up-translate
translation type is used to add markup to data. It sends input directly to find rules and sends output to #main-output
, just as in a cross-translate. However, it also sends a copy of the output to the parser. The parser does not produce any output, but it will raise errors if the markup it receives is incorrect. This checks the validity of the markup produced.
The down-translate
translation type is used to parse data into another form (which may or may not contain markup). A down-translate
sends input directly to the parser; output goes directly to #main-output
.
The context-translate
translation type is used to convert data from one format to another using a particular markup as an intermediate format. A context-translate
sends input directly to find rules and sends the output of the find rules to the parser. Output from the markup rules goes to #main-output
.
You cannot use a process
rule in a program that uses an aided translation type. (Though you can use process-start
and process-end
rules.)
There are also some rule types designed specially for use in aided translation programs:
Aided translation types take their main input from the command line or files named on the command line. However, you can still use submit
, do sgml-parse
, and do xml-parse
within the program. Note that you cannot use do sgml-parse
or do xml-parse
in a cross-translation.
Prerequisite Concepts About OmniMark |
Related Syntax context-translate cross-translate down-translate up-translate |
Copyright © Stilo International plc, 1988-2008.