rng-validate-mode
rng-validate-mode is an interactive autoloaded Lisp function in `rng-valid.el
'.
(rng-validate-mode &optional ARG NO-CHANGE-SCHEMA)
Minor mode performing continual validation against a RELAX NG schema.
Checks whether the buffer is a well-formed XML 1.0 document,
conforming to the XML Namespaces Recommendation and valid against a
RELAX NG schema. The mode-line indicates whether it is or not. Any
parts of the buffer that cause it not to be are considered errors and
are highlighted with face `rng-error'. A description of each error is
available as a tooltip. M-x rng-next-error goes to the next error
after point. Clicking mouse-1 on the word `Invalid' in the mode-line
goes to the first error in the buffer. If the buffer changes, then it
will be automatically rechecked when Emacs becomes idle; the
rechecking will be paused whenever there is input pending.
By default, uses a vacuous schema that allows any well-formed XML
document. A schema can be specified explicitly using
M-x rng-set-schema-file-and-validate, or implicitly based on the buffer's
file name or on the root element name. In each case the schema must
be a RELAX NG schema using the compact schema (such schemas
conventionally have a suffix of `.rnc'). The variable
`rng-schema-locating-files' specifies files containing rules
to use for finding the schema.