4 ms·
> I’m not sure why I thought XHTML was completely dead in this way. Something’s niggling at the back of my mind, but I can’t place it. Browsers were always non
by ttepasse 6y ago
> I’m not sure why I thought XHTML was completely dead in this way. Something’s niggling at the back of my mind, but I can’t place it.
Browsers were always non-validating XML processors. Maybe you're thinking about the Well-formedness constraints? These constraints check if an XML document follows the XML metasyntax and any XML processor is required to fail [1] on errors in these contraints. And browsers do that.
[1] https://www.w3.org/TR/2006/REC-xml11-20060816/#sec-conformance https://www.w3.org/TR/2006/REC-xml11-20060816/#sec-conforman...
In practice most well-formedness violations were nesting errors like missing start or end tags, common when generating XML via text concatenation or templates, which in the dark times a lot of people do, even when they shouldn't . [2] That's why the HTML5 parsing algorithm is so complex and almost unimplementable. It's the ambition for error correction: It tries to generate a DOM out of any well-formed and unwell-formed documents.
[2] https://hsivonen.fi/producing-xml/#nottext https://hsivonen.fi/producing-xml/#nottext