<?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>740</bug_id>
          
          <creation_ts>2004-05-23 17:43:19 +0000</creation_ts>
          <short_desc>Doctype rewrite vs. XmlDecl and Source Listing</short_desc>
          <delta_ts>2009-02-02 21:32:00 +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>0.6.7</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://validator.w3.org/check?uri=http://www.bjoernsworld.de/temp/xmldecl-following-doctype.html;doctype=XHTML+1.0+Strict;ss</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>858</dependson>
    
    <dependson>857</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Bj">bjoern</reporter>
          <assigned_to name="Terje Bless">link</assigned_to>
          <cc>ot</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>1938</commentid>
    <comment_count>0</comment_count>
    <who name="Bj">bjoern</who>
    <bug_when>2004-05-23 17:43:19 +0000</bug_when>
    <thetext>http://validator.w3.org/check?uri=http://www.bjoernsworld.de/temp/xmldecl-
following-doctype.html;doctype=XHTML+1.0+Strict;ss

gives

 1: &lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 
Strict//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt;
 2: &lt;?xml version=&apos;1.0&apos;?&gt;
 3: &lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
 4: &lt;head&gt;
 5:   &lt;title&gt;&lt;/title&gt;
 6: &lt;/head&gt;
 7: 
 8: &lt;body&gt;
 9:   &lt;p&gt;...&lt;/p&gt;
10: &lt;/body&gt;
11: &lt;/html&gt;

which is bad as the XML Declaration must appear prior to any markup. It is also 
bad as that is not the actual source code which one would expect to see here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2192</commentid>
    <comment_count>1</comment_count>
    <who name="Terje Bless">link</who>
    <bug_when>2004-09-01 11:16:52 +0000</bug_when>
    <thetext>Hmmm. I think perhaps this is more a case for managing expectations.

The DOCTYPE Override specifically works only to replace an existing DOCTYPE
delcaration with a new one, or, if one is not present, to insert one at the
beginning of the document. We might be able to take the XML Declaration into
account, but there is no way this feature can DWIM in every conceivable
situation.

Distinguishing the inserted DOCTYPE from the original source text would be a
good enhancement to add, but I&apos;m reluctant to accept it as a &quot;bug&quot; as the
source listing is there to show you what data the Markup Validator has
processed;the original source is readily available to you in your browser&apos;s
&quot;View Source&quot; function or in the original file on disk.


I&apos;m opening two new Enhancement bugs for this -- Bug #857 and Bug #858 -- as
they&apos;re quite different in terms of implementation.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>23397</commentid>
    <comment_count>2</comment_count>
    <who name="Olivier Thereaux">ot</who>
    <bug_when>2009-02-02 21:32:00 +0000</bug_when>
    <thetext>I believe this has been fixed recently while rewriting the override code.

The test case document, at least, now passes with doctype override done after the xmldect.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>