<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>30177</bug_id>
          
          <creation_ts>2017-09-04 19:06:08 +0000</creation_ts>
          <short_desc>Unexpected DOCTYPE declaration error</short_desc>
          <delta_ts>2017-09-11 18:15:58 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Validator</product>
          <component>check</component>
          <version>1.1</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Nick St. Cavish">nodropshots</reporter>
          <assigned_to name="This bug has no owner yet - up for the taking">dave.null</assigned_to>
          <cc>rich</cc>
          
          <qa_contact name="qa-dev tracking">www-validator-cvs</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>128876</commentid>
    <comment_count>0</comment_count>
    <who name="Nick St. Cavish">nodropshots</who>
    <bug_when>2017-09-04 19:06:08 +0000</bug_when>
    <thetext>I am getting the following w3c error when checking my html document:
   Error Line 1, Column 1: end of document in prolog
&lt;?xml version=&apos;1.0&apos; encoding=&apos;UTF-8&apos;?&gt;&lt;!DOCTYPE html PUBLIC &quot;-//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 discrepancy.

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

   &lt;?php echo &quot;&lt;?xml version=&apos;1.0&apos; encoding=&apos;UTF-8&apos;?&gt;&quot;; ?&gt;
   
as do the doctype declaration specifications:

   &lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; 
   &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;

The beginning of the html documents contains the following text:

   &lt;?php error_reporting(E_ALL); ?&gt;
   &lt;?php include(&quot;includes/xml_instr.inc&quot;); ?&gt;
   &lt;?php include(&quot;includes/map_doc_type.inc&quot;); ?&gt;

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?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128877</commentid>
    <comment_count>1</comment_count>
    <who name="Rich Pasco">rich</who>
    <bug_when>2017-09-05 05:25:10 +0000</bug_when>
    <thetext>I have had the same experience.  Starting today, all my pages which used to validate correctly are now giving this error message:

Error Line 1, Column 1: end of document in prolog
&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;&gt;
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 discrepancy.

The pages haven&apos;t changed, so the validator must have.

A browser still displays the pages correctly, so I am certain they are not empty.

     - Rich</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128878</commentid>
    <comment_count>2</comment_count>
    <who name="Nick St. Cavish">nodropshots</who>
    <bug_when>2017-09-05 21:18:02 +0000</bug_when>
    <thetext>Problem is now fixed. Same html files that generated the error yesterday no longer do so. 

Thanks to whoever for the quick response.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128879</commentid>
    <comment_count>3</comment_count>
    <who name="Rich Pasco">rich</who>
    <bug_when>2017-09-07 15:35:04 +0000</bug_when>
    <thetext>I agree that it has been fixed.  My same pages that gave this error now validate correctly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128888</commentid>
    <comment_count>4</comment_count>
    <who name="Rich Pasco">rich</who>
    <bug_when>2017-09-11 18:15:58 +0000</bug_when>
    <thetext>It&apos;s BACK again.  As of 2017-09-11 18:13 UTC, attempting to validate my page
http://www.richpasco.org/
gives:

Validation Output: 1 Error
    Error Line 1, Column 1: end of document in prolog
    &lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;&gt;
    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 discrepancy.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>