contentsconceptssyntaxlibrariessampleserrorsindex
Full text search
rule type   translate    
Sample Code   Related Syntax   Related Concepts  

Syntax

  translate pattern condition?
     action*


Purpose

A rule triggered when data matching a specified pattern occurs. If there is a condition in the rule declaration, the condition must also be met. The matched text must be contained in a single element.

The translate rule is useful for processing data characters in an SGML document. (They are not permitted in cross-translations.)

translate rules apply to data characters in the content of every element. They also apply to cdata attributes that are copied to the output. Finally, they apply to all internal entities.

When the conditions and patterns of more than one translate rule apply to a text string, OmniMark performs the actions associated with the first such rule to appear in the program. When a data character is not replaced by a translation rule, it is passed through, unchanged.

Actions in other rules can suppress character translation for selected parts of the text. In particular, the "z" format modifier suppresses the actions of a translate rule, even if its pattern is found and its conditions met. Streams opened with the domain-free modifier have the "z" modifier placed on them automatically.

Sample Code  
   %c modifiers
 
Related Syntax
   cdata
   domain-free
 
Related Concepts
   Entities: matching based on both name and replacement text
   Entities: matching based on names
   Entities: matching based on replacement text
   Internal entities: combining internal entity and plain-text matching
   Internal entity names: matching
   Translate rule boundaries
   Translate rules: changing current output
 
----

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

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

Copyright © OmniMark Technologies Corporation, 1988-1999.