Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I think that HTML5 parsing rules were a mistake. It makes it so unnecessarily complicated to parse and emit HTML. Instead of having a generic emitter that can format any set of tags you need to understand all of the special tags and deal with it. If it was just allowing some invalid constructs it wouldn't be so bad (but you would need to deal it with reading because people will generate whatever browsers accept) but you even need to be aware of these special rules when emitting. There are tags where adding in self-closing slashes breaks the markup, they need to have a separate start and end tag even if there is no content. So every emitter needs to check this list of hardcoded rules.


Welcome to 1999! XHTML has been created exactly for this reason, and that's even where the self-closing idea came from.

HTML5 syntax hasn't been designed, it's been reverse-engineered from the mess HTML has become while the XHTML has been failing to get proper (XML parsing mode) adoption.


The other nice thing abuot xhtml is you could generate it with xslt. So your AJAX calls (returning results as XML in those days) were easy to format for display and easy to sort, filter, and query without making another round-trip.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: