<?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>3626</bug_id>
          
          <creation_ts>2006-08-25 18:48:22 +0000</creation_ts>
          <short_desc>XHTML detection relies only on namespace declaration</short_desc>
          <delta_ts>2009-04-04 14:21:51 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>CSSValidator</product>
          <component>XHTML1.0</component>
          <version>CSS Validator</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</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="Christoph Schneegans">Christoph</reporter>
          <assigned_to name="This bug has no owner yet - up for the taking">dave.null</assigned_to>
          
          
          <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>11282</commentid>
    <comment_count>0</comment_count>
    <who name="Christoph Schneegans">Christoph</who>
    <bug_when>2006-08-25 18:48:22 +0000</bug_when>
    <thetext>In order to extract CSS rules and declarations from HTML/XHTML documents, the 
CSS Validator needs to parse these documents. Therefore, it needs to determine 
whether a document is HTML or XHTML.

The method currently in use is not very sophisticated; the CSS Validator only 
looks for an XHTML namespace declaration. In particular, it ignores XML 
declarations and XHTML document type declarations. However, the presence of 
these declarations is a very reliable indicator for XHTML, so the CSS Validator 
can safely parse the document as such.

&lt;http://jigsaw.w3.org/css-validator/validator?uri=http://schneegans.de/temp/no-xmlns.html&gt;
does not use an XML parser. Otherwise, the well-formedness violation would be 
detected.

Furthermore, the CSS Validator fails to detect a namespace declaration when it 
is preceded by too many characters. Again,
&lt;http://jigsaw.w3.org/css-validator/validator?uri=http://schneegans.de/temp/late-xmlns.html&gt;
does not use an XML parser.

Parsing XHTML documents as HTML may incorrectly throw errors, e.g.
&lt;http://schneegans.de/temp/space-preserve-no-namespace.html&gt; is valid XHTML and 
conforms to Appendix C guidelines, although
&lt;http://jigsaw.w3.org/css-validator/validator?uri=http://schneegans.de/temp/space-preserve-no-namespace.html&gt;
complains about the &quot;xml:space&quot; attribute.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11295</commentid>
    <comment_count>1</comment_count>
    <who name="Olivier Thereaux">ot</who>
    <bug_when>2006-08-28 02:07:49 +0000</bug_when>
    <thetext>Thank you for adding the issue to the bug tracking system.

For reference, this was also discussed on the mailing-list:
http://lists.w3.org/Archives/Public/www-validator-css/2006Aug/thread.html#msg15</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>15821</commentid>
    <comment_count>2</comment_count>
    <who name="Olivier Thereaux">ot</who>
    <bug_when>2007-07-17 07:22:32 +0000</bug_when>
    <thetext>I think this bug is moot now that we replaced our dual parser with tagsoup.
Need to test and close.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>