|
|||||
|
|||||
Related Syntax | |||||
rule |
invalid-data |
Syntax
invalid-data condition? action*
A rule used to process erroneous input. The DTD restricts where the data content is permitted to occur in an SGML instance. The invalid-data
rule is intended to process data content which violates these restrictions.
As with the selection of any other markup rule, the selection of an invalid-data
rule is determined by the currently active groups and the condition, if any, on each invalid data rule in an active group. The %c
operator is used in the body of the invalid-data
rule to capture the data in question, and either it or the suppress
action must be used (but only once).
If there are no invalid-data
rules in an OmniMark program, and invalid data is encountered, then the marked-section ignore
rules are examined as though the invalid data was the text of an ignore marked section.
OmniMark follows this procedure when invalid data is found:
invalid-data
rule which can be performed, it processes the invalid data. If there are no invalid-data
rules at all, it searches for a marked-section ignore
rule to be performed, and processes the data. If there is no marked-section ignore
rule, the data is discarded.
The following is an example of invalid data:
<!doctype i [ <!element i - o (a)> <!element a - o (#pcdata)> ]> <i> <a> You are about to see invalid data. </a> This is invalid data <? Did you see the invalid data >
The following is an example of an invalid-data
rule:
invalid-data put #error "Trashed: %"%c%".%n"
Related Syntax suppress marked-section ignore |
Copyright © Stilo International plc, 1988-2008.