Subject: Re: [PATCH] Removes the <?xml?> declaration from gitweb.pl

From: Jakub Narebski <[email-masked]>
Date: Fri, 13 Oct 2006 17:09:08 +0200

Robin Rosenberg wrote:
> torsdag 12 oktober 2006 23:21 skrev Jakub Narebski:
>> Robin Rosenberg wrote:
>>> onsdag 11 oktober 2006 23:27 skrev Jakub Narebski:
>>>> Pazu wrote:
>>>>> The XML declaration forces IE6 into quirks mode, breaking our
>>>>> nice standards compliant stylesheet.
>>>>
>>>> But isn't it _required_ by XML/XHTML?
>>>
>>> For pure XML document it is required, but not for XHTML, unless the
>>> encoding is something other than UTF-8 or (shudder) UTF-16. W3C
>>> recommends it though.
>>
>> So what should be our decision? Honor IE quirks ;-) and either remove
>> XML declaration, or use Transitional DTD? Add back SPC to &nbsp; conversion
>> in esc_html? Ignore broken browsers?
> 
> It isn't required by the standard. Why not just drop it?

>>From http://www.w3.org/TR/xhtml1/#docconf

 An XML declaration is not required in all XML documents; however XHTML
 document authors are strongly encouraged to use XML declarations in all
 their documents. Such a declaration is required when the character
 encoding of the document is other than the default UTF-8 or UTF-16 and
 no encoding was determined by a higher-level protocol.

So even if it is not required, it is recommended. But yes, removing
<?xml?> for bug-compatibility conformance is better idea than mucking
with browser detection... if we sould need browser detection to avoid
other bugs (like non-W3C CSS box model in IE), then perhaps we could
reintroduce <?xml?> in standards-conforming browsers.
-- 
Jakub Narebski
Poland