Re:Forth: The programming language that writes itself
by gldrk on Sunday October 19, 2025 @11:23PM
(#45639952)
HTML uses a ton of SGML features not part of XML (sometimes erroneously though to be non-standard ‘tag soup’, not to mention self-closing tags). You need either a specialized parser or an SGML processor + DTD.
[ Parent
| on HN ]
Re:Forth: The programming language that writes itself
by shawn_w on Monday October 20, 2025 @01:08AM
(#45640316)
Wasn't HTML4 the last one defined as a SGML DTD? 5 and on is its own beast.
(rip XHTML)
Re:Forth: The programming language that writes itself
by gldrk on Monday October 20, 2025 @02:44AM
(#45640647)
You are right. There is a third-party DTD that should be mostly compatible (https://sgmljs.sgml.net/docs/html5.html).
In reality, HTML4 was never implemented to the letter by user agents, because people do things like putting -- inside comments.