| Syntax 
   sgml-error condition?
     log?
     local-declaration*
     action*
 Purpose
 
 A rule triggered when an SGML parsing error is found by the SGML parser. The OmniMark program can do several things in an sgml-errorrule. sgml-erroris a deprecated form of themarkup-errorrule.
 This rule is used as follows:
 It can report the error in a manner suited to the task it is performing.
It can put text to the #sgmlstream in up-translations and context-translations to help recover from the error (although this is usually unnecessary and may create more errors).It can examine the error and determine (for example, by checking whether the number of errors has reached a threshold value) if the OmniMark program should stop processing (although there is a command-line option that automates this in simple cases).
 If the logkeyword is specified at the beginning of the rule body, conventional error reporting is done in addition to the actions that follow. If there is more than one sgml-errorrule in an OmniMark program, the firstsgml-errorrule with no condition or a condition of "true" is performed. If there are nosgml-errorrules that can be performed, conventional error reporting is done. When the document instance has SGML errors, the programmer can still obtain control in the document-endrule or in thedo sgml-parseaction to determine how to complete the processing. This allows the program to "clean up properly" while still reporting as many errors as possible before terminating the parsing of the current document. This SGML error rule instructs OmniMark to report an error in the usual fashion. It also outputs the fixed and variable parts of the error message, as well as its line number, in a form that can be accessed by other software. If the variable part of the message is not available, it is not provided.
   sgml-error
    log
    output "\message{%g(#message) on line %d(#line-number)"
    output "%n%g(#additional-info)"
           when #additional-info is attached
    output "}"
#class = 0 reports are always passed tosgml-errorrules, even if the-warningscommand-line option has not been used. This sample shows how to modify OmniMark to ignore these warnings.
 Note that specifying login ansgml-errorrule has no effect on warning reports unless the command-line option "-warning" is included.
   sgml-error unless #class = 0
 |