Re:Linting HTML using CSS
by oneeyedpigeon on Sunday March 12, 2017 @12:17PM
(#13851327)
I've had success with xhtml and xslt processing on the server-side. The fact that it's xhtml is incidental; that it's xml-valid means I can use a wealth of established tools to modify the content, and easily write my own. I don't mind too much about xml support in the browser, although I've found xslt to still be supported in chrome - e.g. for rendering RSS feeds as HTML.
FYI: SGML is way more powerful than XML, and its grammar formalism is identical to that of XML because XML was designed as a simplified subset of SGML. Though Relax NG, and also XML Schema, can theoretically express richer grammars than SGML, they can't be used for HTML due to lack of tag inference and other short syntax features, and the features that Relax NG has over SGML benefit data-oriented rather than document-oriented use cases (eg. the use cases that JSON and other serialization formats are arguably better suited for than markup in the first place IMO).
sgmljs.net can run (also) in the browser, so can also validate HTML5 in the browser.
Disclaimer: my project