<?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>14733</bug_id>
          
          <creation_ts>2011-11-08 20:02:27 +0000</creation_ts>
          <short_desc>self-closing tag in &lt;link rel=&quot;...&quot;  /&gt; causes also error &quot;end tag for head which is not close&quot; in html 4.0</short_desc>
          <delta_ts>2011-11-11 21:02:34 +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>HEAD</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>blocker</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="matteo">matteosistisette</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>59759</commentid>
    <comment_count>0</comment_count>
    <who name="matteo">matteosistisette</who>
    <bug_when>2011-11-08 20:02:27 +0000</bug_when>
    <thetext>Consider this code:

&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;&gt;
&lt;html&gt;
&lt;head&gt;
  &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot;&gt;
  &lt;title&gt;bla bla &lt;/title&gt;
  &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;includes/style.css&quot; /&gt;
  &lt;script type=&quot;text/javascript&quot; src=&quot;includes/jquery162.js&quot;&gt;&lt;/script&gt;
  &lt;script type=&quot;text/javascript&quot; src=&quot;includes/xxx.js&quot;&gt;&lt;/script&gt;
  
    &lt;script src=&quot;http://maps.google.com/maps?file=api&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
    &lt;script src=&quot;includes/general.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
  &lt;script src=&quot;includes/qtobject.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;/head&gt;
&lt;!--comment--&gt;
&lt;body&gt;

....


This causes the following validation errors (the first is a warning):

Line 6, Column 68: NET-enabling start-tag requires SHORTTAG YES
  &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;includes/style.css&quot; /&gt;

 Line 13, Column 7: end tag for element &quot;HEAD&quot; which is not open
&lt;/head&gt;

 Line 15, Column 6: document type does not allow element &quot;BODY&quot; here
&lt;body&gt;


The first warning is OK, but the other two errors don&apos;t make any sense. Removing the &quot;/&quot; in the link tag makes the errors disappear.

The use of a self closing tag ended in /&gt;  shouldn&apos;t cause these errors. Otherwise, the first warning should be an error instead of a warning.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59845</commentid>
    <comment_count>1</comment_count>
    <who name="Ville Skyttä">ville.skytta</who>
    <bug_when>2011-11-10 20:24:35 +0000</bug_when>
    <thetext>Self-closing tags like that don&apos;t exist in SGML (HTML) in the sense they do in XML.  The / in /&gt; closes the link tag, and the &gt; ends up as text content.  Because text content can&apos;t exist in document head, the document body implicitly starts before &gt;, thus the remaining (correct) errors.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59892</commentid>
    <comment_count>2</comment_count>
    <who name="matteo">matteosistisette</who>
    <bug_when>2011-11-11 01:48:40 +0000</bug_when>
    <thetext>Then I think the warning indicating the /&gt; should be an error instead of a warning, at least when in the head section.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59944</commentid>
    <comment_count>3</comment_count>
    <who name="Ville Skyttä">ville.skytta</who>
    <bug_when>2011-11-11 20:24:17 +0000</bug_when>
    <thetext>It is not actually an error; it just doesn&apos;t mean what people tend to think it means so in my opinion a warning rather than an error is appropriate.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59953</commentid>
    <comment_count>4</comment_count>
    <who name="matteo">matteosistisette</who>
    <bug_when>2011-11-11 20:34:25 +0000</bug_when>
    <thetext>but if encountered within the head, it will cause everything else to break</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59970</commentid>
    <comment_count>5</comment_count>
    <who name="Ville Skyttä">ville.skytta</who>
    <bug_when>2011-11-11 21:02:34 +0000</bug_when>
    <thetext>Not always.  For example this is a valid HTML 4.01 Transitional document:

&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;&gt;
&lt;html&gt;
&lt;head&gt;
  &lt;title&gt;bla bla&lt;/title&gt;
  &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;includes/style.css&quot; /&gt;
  Hello World!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>