|
|||||
rule type | translate | ||||
Sample Code | Related Syntax | Related Concepts |
Syntax
translate pattern condition? action*
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.
---- |