|
|||||
|
|||||
Related Syntax | Related Concepts | ||||
rule type |
sgml-comment |
Syntax
sgml-comment condition? action+
A rule that is performed whenever an SGML comment is found in an SGML or XML document and the condition (if any) is met. Note that this rule is deprecated, and the markup-comment
rule has been introduced to replace it.
The following statements apply to sgml-comment
rules:
sgml-comment
rule is performed for an SGML comment, then the comment text is discarded.
sgml-comment
rules, then all comments are discarded.
sgml-comment
rule may be selected for an SGML comment. That is, either there must only be one sgml-comment
rule or, if there is more than one, each rule must have a condition so that only one rule applies to any given comment. It is an error for more than one sgml-comment
rule to be selected for an SGML comment.
%c
operator captures the text of a comment. Either %c
or suppress
must be used exactly once in an sgml-comment
rule. The "u", "l", "s", "h", and "z" format modifiers can be used on a %c
operator in an sgml-comment
rule.
sgml-comment
rules in the OmniMark program. All comments in the document prolog (containing the DTD) and document instance are available for processing.
sgml-out
action determines what happens to record ends in comment text.
sgml-comment
rules affects how translate
rules match text around a comment in the following fashion:
translate
rules in progress when the SGML comment is encountered are terminated, and translate
rule processing is suspended until the comment is processed.
sgml-comment
rules apply to the comment (that is there is a rule in the currently active groups either with no condition or a condition that succeeds)
sgml-comment
rules apply
translate
rule processing is resumed.
It is an error for more than one sgml-comment
rule to be selected for an SGML comment. This means that:
This is an example of sgml-comment
rules with conditions:
sgml-comment when element is p output " (note: %c)" sgml-comment when element isnt p output " note: %c%n"
Related Syntax suppress translate markup-comment |
Related Concepts XML/SGML comments and marked section boundaries |