W3C home > Mailing lists > Public > public-html@w3.org > August 2010

Re: Polyglot Markup/XML encoding declaration

From: Maciej Stachowiak <mjs@apple.com>
Date: Sun, 01 Aug 2010 17:05:18 -0700
Cc: Lachlan Hunt <lachlan.hunt@lachy.id.au>, HTMLwg <public-html@w3.org>, Eliot Graff <eliotgra@microsoft.com>, public-i18n-core@w3.org
Message-id: <FFC4367D-3188-487E-9AFA-D23BA68A42F8@apple.com>
To: Leif Halvard Silli <xn--mlform-iua@xn--mlform-iua.no>

(chair hat off)

On Aug 1, 2010, at 12:55 AM, Leif Halvard Silli wrote:

> Lachlan Hunt, Thu, 29 Jul 2010 15:30:02 +0200:
>> 
>> A polyglot may be served as HTML too.  HTML5 does consider the XML 
>> declaration to be non-conformant, and including it is unnecessary 
>> polution.
> 
> This touches the question of whether Polyglot Markup is a specification 
> or a authoring guide. The TAG by Tim Berners Lee has suggested that is 
> to be a specification. Of course, even as a spec, it does not need to 
> include the xml declaration. But if it is a spec, then it could include 
> it.

[...]

>>> The XML declaration would not be generally permitted in HTML - it would
>>> only be permitted in polyglot markup.
>> 
>> There is no way to make some syntax conforming for polyglot documents 
>> only.
> 
> Just make a validator which does.

The original premise of the polyglot spec was to describe a type of document that is valid as both HTML5 and XHTML5, and works sufficiently the same both ways. Thus, it does not match the original goals to have a construct that is valid in polyglot documents, but invalid in at least one of HTML5 or XHTML5. Indeed, Lachlan already pointed this out:

> 
>> Such a requirement is unenforceable because the conforming 
>> polyglot document syntax is and should remain only the intersection 
>> of HTML and XHTML syntax.


Also, besides this general point, there is the fact that an XML declaration will trigger quirks mode in some legacy UAs, thus it is a bad idea to serve content including an XML declaration as text/html.

Regards,
Maciej
Received on Monday, 2 August 2010 00:05:56 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 2 August 2010 00:05:57 GMT