Re: xkcd: LTR

From: Philippe Verdy <verdy_p_at_wanadoo.fr>
Date: Wed, 28 Nov 2012 01:10:45 +0100

2012/11/27 Leif Halvard Silli <xn--mlform-iua_at_xn--mlform-iua.no>

>
> The fact that XHTML 1 permits the XML prolog regardless how the
> document is served, is just a shortcoming of the XHTML 1 specification.
>
>
No, it was by design. Making HTML an application of XML. Only XML but
with all rules of XML.

> So these browsers must find
> > something else: given the XML prolog they should then use HTML5 in
> > its XHTML profile, not in its HTML profile
>
> No, that is not how things works. The decision to parse the document as
> HTML is taken before the browser sees the XML prologue. So the prologue
> should not - and does not - change anything with regard to parsing as
> HTML or as XML.

Then explain why the W3C validator sees absolutley no problem in the way
these XHTML1 pages are encoded and transported.

> > ; in this profile, they
> > MUST honor the XML prolog and notably its XML encoding declaration
> > (given that the encoding is not specified in the HTTP Content-type.
>
> Again: Absolutely not. They must not, will not and must not honour the
> XML prologue. (It is another matter that some user agents sometimes use
> the prologue to look for encoding information.)
>
>
Sure they can because this XHTML1 site violates HTML5 rules, missing its
required prologue.

> Now given the XML prolog and the DTD declaration, the file is clearly
> > not even HTML5 in XML/XHTML (i.e. XHTML 5), but is XHTML 1 (based on
> > a stable subset of HTML4, but working in strict mode without the
> > quirks modes). Once again, this excludes using the HTML5 rules again.
>
> In a way the names and the numbers (HTML4, XHTML1, HTML5) are just
> confusing. There is just one way to parse HTML. When it comes to HTML
> (text/html),then HTML5 differs from HTML4 and XHTML1 in that it is not
> based on a *another* format than HTML itself. Because HTML4 and XHTML1
> are not based on how HTML actually works, and - in addition - does not
> take fully account of that (or whatever the reason), they allow
> syntaxes, such as DTD declarations, which have no effect (except
> side-effects such as quirks-mode) in HTML.
>

HTML5 admits the two syntaxes : SGML-based like it is used primarily (in a
simplified profile), and XML.

> > I'm still convinced that these are bugs in Firefox and IE, which
> > support only HTML5 in its basic HTML profile, but not HTML5 in its
> > XML/XHTML profile (which is also part of the HTML5 standard and where
> > processing the XML prolog is NOT an option but a requirement).
>
> Just for the record: HTML5 defines the most up-to-date parsing
> mechanism for *all* HTML documents - HTML1,2,3,5 as well as any flavour
> of XHTML served as HTML. HTML5 does not allow authors to use the XML
> prologue.
>

Where ? The required HTML5 prolog applies to its SGML based syntax ; it
makes no sense in XHTML as it voluntarily violates the validity of the XML
document declaration.

The absence of the HTML5 required prolog (in its standard basic-SGML
profile), or the presence of another incompatible XML prolog is enough to
make the distinction between the two syntaxes. But both syntaxes will
generate the same HTML DOM, which is just enough to make the proper
rendering intended, and make HTML5 compatible with both syntaxes.

Now HTML5 is still not completely polished, finished and approved. Such
interoperability rules are not clearly defined even if they are the "most
up-to-date" to make it work seamlessly with the claimed compatibility with
all flavors of HTML or XHTML. And the fact that Firefox and IE behave
differently from Chorme and Safari in this domain is a proof of this
unfinished status.
Received on Tue Nov 27 2012 - 18:16:47 CST

This archive was generated by hypermail 2.2.0 : Tue Nov 27 2012 - 18:16:55 CST