News for hackers. Stuff that matters.
Re:Next Gen Static Blogging by anjbe on Saturday January 09, 2021 @06:20PM (#25706163)
Implicit and optional tags have been part of HTML for decades. A valid HTML page that uses them is completely unambiguous. Nothing prevents it from being parsed and converted to an XML‐compatible document on the fly by tools.

Writing HTML in an XML‐like fashion has its own quirks since HTML is not parsed the same way. Can you add elements within an <img></img>, or self‐close a <span/>?

Re:Next Gen Static Blogging by still_grokking on Saturday January 09, 2021 @06:54PM (#25706501)
Automatic conversion to XML is not always possible cleanly as those documents tend to not follow all rules (which can happen for example by template nesting). At that point you have a headache.

The point of being XML compatible is not about the browser environment. It's about tools and processes that work with XML (and assume therefore valid XML) and use your HTML as input. That's still a quite common thing. Even you don't do it today you can't know whether you or someone else is going to need it tomorrow.

Being XML compatible also opens up the possibility to use powerful tools like transformations and queries right on the raw HTML data in ad-hoc scenarios.

Sure, that's nothing you would do on an private blog usually, but in more enterprisey settings all kinds of processing happens on all kinds of data, quite often including web page contents. My experience after working in such environments is that not keeping HTML XML compatible will cause some serous trouble eventually.

Re:Next Gen Static Blogging by simonw on Saturday January 09, 2021 @09:31PM (#25708209)
I haven't encountered a tool that uses an XML parser against HTML in over a decade.
Re:Next Gen Static Blogging by still_grokking on Saturday January 09, 2021 @11:14PM (#25709863)
Maybe you just didn't any ETL things lately. :-)