prolog-in-error

rule

Syntax
prolog-in-error condition?
        action*
    


Purpose

The prolog of a document is anything occurring before the start tag of its root element, such as the SGML or XML declaration or the DTD. If the prolog is erroneous, the XML or SGML parser may be unable to parse the rest of the document. If you need to perform any actions at the end of the prolog when it is in error, you can write a prolog-in-error rule.

A prolog-in-error rule is an alternative to a prolog-end rule. A prolog-end rule is fired at the end of the prolog if no fatal errors occur in the prolog, and the parsing can continue. A prolog-in-error rule is fired if fatal errors occurred in the prolog. Note that the prolog-in-error rule is not fired at the time that the error is detected. Errors in the prolog cause a markup-error rule to be fired. The prolog-in-error rule is fired at the end of the prolog if the errors that occurred in the prolog prevent the markup parser from continuing.

You can have more than one prolog-in-error rule. All such rules will be performed in the order they occur in the program.