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 14:52:16 +0100
Message-Id: <C069136D-340B-4FAF-8487-E15396B70432@dorward.me.uk>
To: www-validator Community <www-validator@w3.org>

On 20 Jul 2007, at 11:51, Sierk Bornemann wrote:
> header.html:
> <!--#if expr="${IELegacy}" --><!--#else --><?xml version="1.0"  
> encoding="utf-8"?>
> <!--#endif --><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
>  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

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).

What's the point of adding the XML declaration under any  
circumstances short of changing output language or encoding?

-- 
David Dorward
http://dorward.me.uk/
http://blog.dorward.me.uk/
Received on Friday, 20 July 2007 13:52:45 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:25 GMT