2 ms·
sgmljs.net also bundles a markdown parser, a DTD for W3C HTML 5.2 (a really long string), SGML declaration support, loads of diagnostic messages, an URL parser,
by tannhaeuser 4y ago
sgmljs.net also bundles a markdown parser, a DTD for W3C HTML 5.2 (a really long string), SGML declaration support, loads of diagnostic messages, an URL parser, SGML LINK with pipelining and templating, implementations for a couple of (HyTime general arch) formal system identifiers such as for date and CSV parsing/formatting, plus a couple other things. It has essentially no external dependencies.
The XML subset of SGML is simpler (that's the entire point of it) but implementing DOCTYPEs with the subset of markup declarations supported by XML still will take you much more than "the remainder of a man-day" LOL. Yes unlike with SGML, you can use an off-the-shelf regexp lib to perform actual checking, but you still need to perform model admissibility/ambiguousness checking with halfway usable diagnostics, and require hundreds of test cases.
XML might be ok as a markup delivery format (that didn't make it on the web), but it absolutely doesn't begin to meet the bar of an authoring format. If it were, nobody would be using markdown, MediaWiki syntax, or other custom Wiki syntax, and your collection of helper apps and CMSs, template engines, and whatnot. All of which is included in SGML.
(Still, I upvoted your comment FWIW)