Using onsgmls to validate XML documents is a bit
difficult at first. You have to set a couple of
environment variables and then pass the -wxml option,
and it's not obvious from the documentation (eg the
manual page makes no mention of setting environment
variables for XML).
Since XML validation is such a common task, it would be
a good idea to have a single option which turns on the
necessary switches, for example
% onsgmls --xml -s foo.xml
The --xml option will do the equivalent of setting
SP_CHARSET_FIXED=yes, SP_ENCODING=xml, and turning on
In fact, onsgmls could do this when invoked as 'xmls'.
Then the xmls manual page could talk about validating
XML documents, not mentioning the SGML-specific things.
This would make it much easier for novice users to
validate XML, which is surely something to be encouraged.
Log in to post a comment.