Earlier quoted context omitted.
The thing is, the browser needs the tree, but the server doesn't really need the whole tree. Building the tree on the server is usually wasted work. Not a lot of tree oriented output as you make it libraries.
My point is that treating it as the tree it is, is the only way to really make it impossible to produce invalid HTML. You could also actually validate not just syntax, but also semantic. > Not a lot of tree oriented output as you make it libraries. That was actually the point of my library, although I must admit, I haven't implemented actually streaming the HTML output out, before having composed the whole tree. It i…
https://github.com/urweb/urweb
http://www.impredicative.com/ur/
Needless to say it wasn't very practical. But there was one commercial site written in it https://github.com/bazqux/bazqux-urweb (the site still exists but not sure if it's still written in ur/web)