|
|||||
Marked sections: processing CDATA and RCDATA | |||||
Related Syntax |
CDATA and RCDATA marked sections serve to protect text from being misinterpreted as markup (start tags, end tags, entity references or declarations). These marked sections affect how the data is parsed by the SGML parser, but they do not usually affect the way that OmniMark processes the resulting data content.
marked-section cdata
and marked-section rcdata
rules can be used to identify content that was wrapped in a CDATA or RCDATA marked section.
It is very important to understand that the presence or absence of marked-section
rules does not affect how marked sections are treated by the SGML parser. They only determine how the SGML parser presents the resulting text to OmniMark.
A similar set of statements applies to CDATA and RCDATA marked sections as applies to IGNORE marked sections. The major difference is that the "default" processing for CDATA and RCDATA marked section is to treat their text content as data content, and not to discard it.
marked-section cdata
or marked-section rcdata
rules, then OmniMark treats the text resulting from these marked sections as if the text resulted from ordinary data content. In other words, OmniMark does not detect the boundaries between the text originating from inside the marked section and the text originating from outside the marked section.
marked-section cdata
rule may be selected for a CDATA marked section. That is, either there must only be one marked-section cdata
rule or, if there is more than one such rule, each must have a condition. Similarly, only one marked-section rcdata
rule may be selected for an RCDATA marked section. It is an error for more than one marked-section cdata
or marked-section rcdata
rule to be selected for a CDATA or an RCDATA marked section.
%c
operator captures the text of a CDATA or RCDATA marked section. Either %c
or suppress
must be used exactly once in a marked-section cdata
or marked-section rcdata
rule. All modifiers supported by %c
can be used on a %c
operator in a marked-section cdata
or marked-section rcdata
rule.
marked-section
rule in the OmniMark program.
sgml-out
action determines what happens to record ends in the text of a CDATA and RCDATA marked section.
Related Syntax marked-section cdata marked-section rcdata |
---- |