<?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>3810</bug_id>
          
          <creation_ts>2006-10-06 11:01:04 +0000</creation_ts>
          <short_desc>Doesn&apos;t correctly validate non &quot;empty&quot; elements that use shortcut</short_desc>
          <delta_ts>2009-06-23 15:39:05 +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>HEAD</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</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="Brett Parker">iDunno</reporter>
          <assigned_to name="Olivier Thereaux">ot</assigned_to>
          <cc>glen.84</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>12341</commentid>
    <comment_count>0</comment_count>
    <who name="Brett Parker">iDunno</who>
    <bug_when>2006-10-06 11:01:04 +0000</bug_when>
    <thetext>When using XHTML, according to the specification (XHTML1 spec, section 4.3, http://www.w3.org/TR/xhtml1/#h-4.3) it is required that any element that has not got EMPTY declared in the DTD should always use the form &lt;tag&gt;&lt;/tag&gt;, but testing this, for example with a simple XHTML document containing &lt;div /&gt; passes validation.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12412</commentid>
    <comment_count>1</comment_count>
    <who name="Olivier Thereaux">ot</who>
    <bug_when>2006-10-13 02:38:47 +0000</bug_when>
    <thetext>Hi Brett,

(In reply to comment #0)
&gt; When using XHTML, according to the specification (XHTML1 spec, section 4.3,
&gt; http://www.w3.org/TR/xhtml1/#h-4.3) it is required that any element that has
&gt; not got EMPTY declared in the DTD should always use the form &lt;tag&gt;&lt;/tag&gt;, but
&gt; testing this, for example with a simple XHTML document containing &lt;div /&gt;
&gt; passes validation.

My interpretation of the specification is:

* 4.3 says end tags are necessary, unlike in HTML &lt;= 4.01
However, according to XML rules, for elements without content, minimization such as &lt;foo /&gt; is equivalent to having a start and end tag for the element.

* 4.6 says [[ Empty elements must either have an end tag or the start tag must end with /&gt;. ]]

* The (informative) appendix C for the compatibility of XHTML 1.0 documents served as text/html specifies that [[ Given an empty instance of an element whose content model is not EMPTY (for example, an empty title or paragraph) do not use the minimized form (e.g. use &lt;p&gt; &lt;/p&gt; and not &lt;p /&gt;). ]] That is, however, beyond the realm of validation, and an informative guideline, as far as I can tell. 


This aspect of the specification is confusing to me, I confess. Partly because &quot;empty elements&quot; are not defined anywhere, and are sometimes meant as &quot;elements defined as EMPTY in the DTD&quot;, sometimes as the generally accepted definition of an element without content.

Discussion threads I could find on the matter seem to dodge the question by stating that non EMPTY (as in, not declared EMPTY in the DTD) should never be empty (as in, no content), and that &lt;div /&gt; makes no sense. Still, my interpretation of the spec is that &lt;div /&gt; is a valid and well-formed construct, however not recommended for content served as text/html.

That&apos;s probably worth asking the HTML working group, responsible for the edition (and exegesis) of the spec, for clarifications. I&apos;ll try to get their attention on this bug report.

Thanks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>25576</commentid>
    <comment_count>2</comment_count>
      <attachid>709</attachid>
    <who name="Glen">glen.84</who>
    <bug_when>2009-06-14 12:05:31 +0000</bug_when>
    <thetext>Created attachment 709
Self-closing anchor tag can break IE8 layout

One thing to note is that a self-closing anchor tag can break a layout in Internet Explorer 8. See attachment.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>25675</commentid>
    <comment_count>3</comment_count>
    <who name="Brett Parker">iDunno</who>
    <bug_when>2009-06-23 15:39:05 +0000</bug_when>
    <thetext>Just wondering if there&apos;s any movement on this ticket... it appears that the validator still (incorrectly, IMO, and by the looks of various browsers, in their interpretation of the spec) doesn&apos;t produce and error or warning for documents containing empty elements that aren&apos;t declared as EMPTY. (e.g. &lt;div /&gt;).

Thanks,
Brett Parker</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>709</attachid>
            <date>2009-06-14 12:05:31 +0000</date>
            <delta_ts>2009-06-14 12:05:31 +0000</delta_ts>
            <desc>Self-closing anchor tag can break IE8 layout</desc>
            <filename>ie8-self-closing-anchor.htm</filename>
            <type>text/html</type>
            <size>406</size>
            <attacher name="Glen">glen.84</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBYSFRNTCAxLjAgVHJhbnNpdGlvbmFs
Ly9FTiIgImh0dHA6Ly93d3cudzMub3JnL1RSL3hodG1sMS9EVEQveGh0bWwxLXRyYW5zaXRpb25h
bC5kdGQiPg0KPGh0bWwgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGh0bWwiIHhtbDps
YW5nPSJlbiIgbGFuZz0iZW4iPg0KPGhlYWQ+DQoJPHRpdGxlPklFOCBTZWxmLWNsb3NpbmcgQW5j
aG9yPC90aXRsZT4NCjwvaGVhZD4NCjxib2R5Pg0KCTwhLS0gPGEgbmFtZT0iZ29vZCI+PC9hPiAt
LT4NCgk8YSBuYW1lPSJiYWQiIC8+DQoJPGRpdiBzdHlsZT0icG9zaXRpb246YWJzb2x1dGU7Ij4N
CgkJT25lIFR3byBUaHJlZSA8YSBocmVmPSIjIj5Gb3VyPC9hPg0KCTwvZGl2Pg0KPC9ib2R5Pg0K
PC9odG1sPg==
</data>

          </attachment>
      

    </bug>

</bugzilla>