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

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
http://dorward.me.uk/
http://blog.dorward.me.uk/

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