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

[Bug 30177] New: Unexpected DOCTYPE declaration error

From: <bugzilla@jessica.w3.org>
Date: Mon, 04 Sep 2017 19:06:08 +0000
To: www-validator-cvs@w3.org
Message-ID: <bug-30177-169@http.www.w3.org/Bugs/Public/>

            Bug ID: 30177
           Summary: Unexpected DOCTYPE declaration error
           Product: Validator
           Version: 1.1
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: check
          Assignee: dave.null@w3.org
          Reporter: nodropshots@gmail.com
        QA Contact: www-validator-cvs@w3.org
  Target Milestone: ---

I am getting the following w3c error when checking my html document:
   Error Line 1, Column 1: end of document in prolog
<?xml version='1.0' encoding='UTF-8'?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML
This error may appear when the validator receives an empty document. Please
make sure that the document you are uploading is not empty, and report any

The xml instructions comes from an include (inc) file:

   <?php echo "<?xml version='1.0' encoding='UTF-8'?>"; ?>

as do the doctype declaration specifications:

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

The beginning of the html documents contains the following text:

   <?php error_reporting(E_ALL); ?>
   <?php include("includes/xml_instr.inc"); ?>
   <?php include("includes/map_doc_type.inc"); ?>

I have not changed the two include files for years, and have never seen this
w3c error message. In fact, the same error is encountered now on html web pages
generated several years ago, which never had the error.

Has something changed recently in the w3c validator to cause this error? If
not, what am I doing wrong?

You are receiving this mail because:
You are the QA Contact for the bug.
Received on Monday, 4 September 2017 19:06:15 UTC

This archive was generated by hypermail 2.3.1 : Monday, 4 September 2017 19:06:15 UTC