W3C home > Mailing lists > Public > www-validator@w3.org > July 2007

Re: Removing XML decl (Re: validator/htdocs header.html,1.50,1.51)

From: David Dorward <david@dorward.me.uk>
Date: Fri, 20 Jul 2007 16:56:16 +0100
Message-Id: <23473417-3FF9-488F-BD2A-8FBE2A692029@dorward.me.uk>
To: www-validator Community <www-validator@w3.org>

On 20 Jul 2007, at 16:46, Sierk Bornemann wrote:

>> If there is no XML declaration, then XML parsers, IIRC, are  
>> supposed to assume XML 1.0 and UTF-8 or -16 (depending on the BOM,  
>> if present).
> If an XML parser is to be applied at all and not a SGML parser,  
> depending on which MIME type is served...
> But that's another hot discussion...

Entirely. Although if a text/html content-type is used, then Appendix  
C recommends you don't use an XML declaration at all.

>> What's the point of adding the XML declaration under any  
>> circumstances short of changing output language or encoding?
> For instance to be as compliant and close to the XHTML 1.0  
> Recommendation as possible?

Which uses the weak term "strongly encouraged", which doesn't make it  
a requirement, and doesn't use RFC language such as "SHOULD".

> Remember: Serving a XHTML 1.0 document as "text/html" is a "MAY"  
> whereas serving it as "application/xhtml+xml" (and so serving it as  
> XML) is a "SHOULD".
> "SHOULD" has a stronger meaning than "MAY" (in contrast: "SHOULD  
> NOT" has a weaker meaning than "MUST NOT").

This is the content-type issue again.

David Dorward
Received on Friday, 20 July 2007 15:56:49 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:17:52 UTC