On 12/18/21 14:33, Patrice Dumas wrote:
On Wed, Dec 15, 2021 at 05:21:26PM -0800, Per Bothner wrote:
Emacs nxml mode should be sufficient to check well-formedness.
Is there documentation on how use nxml mode to check well-formedness
from the command line? I cannot find any information on that on the
web. All the information I found is about using nxml mode from within
emacs.
If you want command-line/batch testing of well-formedness then nxml-mode
is probably not your best bet.
One possibility is to use xltproc with a null or identity stylesheet.
Well-formedness of normal XML documents (without external entities
or other complications that nobody uses) is pretty trivial. The main
issue is making sure that special characters are escaped properly. And
of course all elements have to be properly nested and terminated.
This requires no semantic knowledge.
--
--Per Bothner
[email protected] http://per.bothner.com/