Lennart Jablonka dixit:

> And here I thought that all of XHTML 1.0, XHTML 1.1, HTML5 XML syntax, and
> WHATWG HTML XML syntax defer parsing to the XML processor.

As usual, it depends.

Iff the browser requests XHTML served as XML, that is, if the browser
sends an HTTP Accept header that contains application/xhtml+xml (and
probably contains that before text/html if both are given), then the
server may send the document as XML, skipping the space before “/>”.
I’m not sure whether it may then also self-close all tags but would
assume so (except I know tech is… tricky).

If however the browser does not send that header, the document must be
served in compatibility mode, in particular the self-closing tags thing
(if you self-close <textarea/>, even Firefox croaks and dies), but also
a compatibility space before “/>” for best effect.

(And yes, XHTML, despite later changes to the HTTP docs, may be served
as text/html, but only under these caveats; the XHTML spec supports
this.)

tl;dr it’s a mess…

bye,
//mirabilos
-- 
22:20⎜<asarch> The crazy that persists in his craziness becomes a master
22:21⎜<asarch> And the distance between the craziness and geniality is
only measured by the success 18:35⎜<asarch> "Psychotics are consistently
inconsistent. The essence of sanity is to be inconsistently inconsistent

Reply via email to