<?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>12</bug_id>
          
          <creation_ts>2002-10-24 21:51:00 +0000</creation_ts>
          <short_desc>XML Parser does not detect whitespace before XML Decl.</short_desc>
          <delta_ts>2016-05-18 18:46:32 +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>Parser</component>
          <version>0.6.0b1</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://www.bjoernsworld.de/temp/chars-before-xmldecl.html</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>1.0</target_milestone>
          
          <blocked>29651</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Terje Bless">link</reporter>
          <assigned_to name="Terje Bless">link</assigned_to>
          <cc>BRANSTORM_69Q</cc>
    
    <cc>brantgurganus2001</cc>
    
    <cc>egil</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>14</commentid>
    <comment_count>0</comment_count>
    <who name="Terje Bless">link</who>
    <bug_when>2002-10-24 21:51:00 +0000</bug_when>
    <thetext>Reported by Björn Höhrmann:

  http://www.bjoernsworld.de/temp/chars-before-xmldecl.html is 

  [...]

  &lt;?xml version=&apos;1.0&apos; encoding=&apos;iso-8859-1&apos;?&gt;
  &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;
  
  &lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
    &lt;head&gt;
      &lt;title&gt;...&lt;/title&gt;
    &lt;/head&gt;
  
    &lt;body&gt;
      &lt;p&gt;...&lt;/p&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  [...]

That&apos;s an invalid XHTML 1.0 Strict document (note the
CRLF preceding the XML declaration). Now the HTML Validator
&lt;URL:http://validator.w3.org:8001/check?uri=http%3A%2F%2Fwww.
bjoernsworld.de%2Ftemp%2Fchars-before-xmldecl.html&gt; says it&apos;s
valid. That&apos;s bad. The Site Valet XML Validator finds the error
&lt;URL:http://valet.webthing.com:8000/xmltest/val.so?
url=http%3A%2F%2Fwww.bjoernsworld.de%2Ftemp%2Fchars-before-xmldecl.html&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>25</commentid>
    <comment_count>1</comment_count>
    <who name="Terje Bless">link</who>
    <bug_when>2002-10-25 03:01:06 +0000</bug_when>
    <thetext>This is a known issue with OpenSP and SP. For some reason they do not detect
whitespace before the XML Declaration -- or at least do not report it -- and
according to Arjun Ray it&apos;s &quot;impossible&quot; for them to do it. I&apos;m afraid my C++-fu
is a bit too weak to figure out exactly what&apos;s going on.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>359</commentid>
    <comment_count>2</comment_count>
    <who name="Brant Langer Gurganus">brantgurganus2001</who>
    <bug_when>2003-02-21 16:12:24 +0000</bug_when>
    <thetext>If it is of any use, Mozilla seems to give a well-formed error with this.  Since
it is open-source, perhaps you can investigate how it detects the issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>7663</commentid>
    <comment_count>3</comment_count>
    <who name="murali">murali1287</who>
    <bug_when>2006-01-06 08:26:37 +0000</bug_when>
    <thetext>xx</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>7665</commentid>
    <comment_count>4</comment_count>
    <who name="murali">murali1287</who>
    <bug_when>2006-01-06 08:33:55 +0000</bug_when>
    <thetext>*** Bug 14 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8056</commentid>
    <comment_count>5</comment_count>
    <who name="Bj">bjoern</who>
    <bug_when>2006-01-31 00:46:25 +0000</bug_when>
    <thetext>*** Bug 2785 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8057</commentid>
    <comment_count>6</comment_count>
    <who name="Maciej Jaros">egil</who>
    <bug_when>2006-01-31 01:33:58 +0000</bug_when>
    <thetext>I just want to add that since CSS validator detects incorrect placing of
&quot;&lt;?xml...?&gt;&quot; then maybe the validator for XHTML should borrow some of it&apos;s code ;).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11311</commentid>
    <comment_count>7</comment_count>
      <attachid>438</attachid>
    <who name="Olivier Thereaux">ot</who>
    <bug_when>2006-08-30 02:20:35 +0000</bug_when>
    <thetext>Created attachment 438
invalid whitespace before xml declaration

saved from http://www.bjoernsworld.de/temp/chars-before-xmldecl.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>15177</commentid>
    <comment_count>8</comment_count>
    <who name="Olivier Thereaux">ot</who>
    <bug_when>2007-05-24 05:06:27 +0000</bug_when>
    <thetext>our using XML::LibXML in 0.8.0 (currently beta) takes care of this issue.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>438</attachid>
            <date>2006-08-30 02:20:35 +0000</date>
            <delta_ts>2006-08-30 02:20:35 +0000</delta_ts>
            <desc>invalid whitespace before xml declaration</desc>
            <filename>12-chars_before_xmldecl.xhtml</filename>
            <type>application/xhtml+xml</type>
            <size>288</size>
            <attacher name="Olivier Thereaux">ot</attacher>
            
              <data encoding="base64">Cjw/eG1sIHZlcnNpb249JzEuMCcgZW5jb2Rpbmc9J2lzby04ODU5LTEnPz4KPCFET0NUWVBFIGh0
bWwgUFVCTElDICItLy9XM0MvL0RURCBYSFRNTCAxLjAgU3RyaWN0Ly9FTiIKICAgICJodHRwOi8v
d3d3LnczLm9yZy9UUi94aHRtbDEvRFREL3hodG1sMS1zdHJpY3QuZHRkIj4KCjxodG1sIHhtbG5z
PSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hodG1sIj4KICA8aGVhZD4KICAgIDx0aXRsZT4uLi48
L3RpdGxlPgogIDwvaGVhZD4KCiAgPGJvZHk+CiAgICA8cD4uLi48L3A+CiAgPC9ib2R5Pgo8L2h0
bWw+
</data>

          </attachment>
      

    </bug>

</bugzilla>