W3C home > Mailing lists > Public > www-validator@w3.org > September 2001

Validator says non-well-formed document is well-formed

From: Karl Ove Hufthammer <huftis@bigfoot.com>
Date: Wed, 5 Sep 2001 20:40:06 +0200
Message-ID: <000d01c1363a$2efcb140$a2448ed5@huftis>
To: <www-validator@w3.org>
According to the W3C Validator, the following piece of XHTML is well-formed
(and valid):

<?xml version="1.0" charset="iso-8859-1"?>

<!DOCTYPE html
  PUBLIC "-//W3C//DTD XHTML 1.1//EN"

<html xml:lang="en">




But the XML declaration can only be written:

'<?xml' VersionInfo EncodingDecl? SDDecl? S? '?>'

(I.e., there is no 'charset' pseudo-attribute.)

(Both the MSXML 4 parser and Ælfred (another XML parser) chokes on the
document above, but if I change 'charset' to 'encoding', it works fine.)

Karl Ove Hufthammer
Received on Wednesday, 5 September 2001 14:40:32 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:58:23 UTC