4 ms·
XML validators are much more common in editors than HTML validators, probably because XML is both easier to parse and used for a lot more than XHTML.
by Arnavion 10y ago
XML validators are much more common in editors than HTML validators, probably because XML is both easier to parse and used for a lot more than XHTML.
- DonHopkins 10y agoI write and edit all my Genshi [1] templates as xhtml, so I can validate and process them as crisp clean hi-fidelity xml, and then pump them out to browsers with the html serializer [2]. If I were inclined to follow Google's guidelines on omitting optional tags, it would be easy to write a stream filter that removed them [3]. But I prefer source templates to have all the explicit properly indented structure, so they're easier to validate and process with XML tools (and by eye), and unintentional mistakes don't sneak through as easily. For the same reason, I also prefer not to write minified JavaScript source code: that should be done by post-processors, no humans. ;) [1] https://genshi.edgewall.org/ https://genshi.edgewall.org/ [2] https://genshi.edgewall.org/wiki/ApiDocs/genshi.output https://genshi.edgewall.org/wiki/ApiDocs/genshi.output [3] https://genshi.edgewall.org/wiki/Documentation/streams.html#serialization https://genshi.edgewall.org/wiki/Documentation/streams.html#...