It is possible to stop all validation and report failure with an error message. This is done with the xml-validation-error function. This is dangerous, however, since it does not play well with optional matching, and it is very difficult to truly understand the ramifications of stopping with an error.
The xml-validation-error function takes a format control string and arguments, and stops validation with the error produced by applying format to the format string and arguments.
Syntax:
xml-validation-error format-string &rest arguments nil
Arguments and Values:
format-string--a format control string. This should not include any newlines.
arguments--arguments to format.