This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 10022 - XHTML1 validation service should not permit <h1>
Summary: XHTML1 validation service should not permit <h1>
Alias: None
Product: Validator
Classification: Unclassified
Component: Parser (show other bugs)
Version: HEAD
Hardware: All All
: P2 critical
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: qa-dev tracking
Depends on:
Reported: 2010-06-27 15:23 UTC by Leif Halvard Silli
Modified: 2011-08-23 18:09 UTC (History)
1 user (show)

See Also:


Description Leif Halvard Silli 2010-06-27 15:23:28 UTC

If we try to validate the following as XHTML1 or HTML4


then we get differene answer:

[XHTML1 validator:] 
Line 9, Column 8: document type does not allow element "h2" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag

[HTML4 validator:]
 Line 9, Column 8: document type does not allow element "H2" here; missing one of "APPLET", "OBJECT", "MAP", "IFRAME", "BUTTON" start-tag

It is not logical that the XHTML1 validator permits <ins> and <del> here. Were is the justification for that? HTML4 should here be identical.

See justification here:

Summary: "The purpose of  <ins> and <del> is not to document that the author corrected his/her code from illegal code//impossible DOM to legal code/possible DOM!"
Comment 1 Leif Halvard Silli 2010-06-27 16:05:23 UTC
To back up my claim about an error, I'll point out that the example given in HTML4.01 as an example of _illegal_ markup, currently is stamped as *valid* - both by the XHTML1.x validaton service and the HTML4.01 validation service. This is the example code from HTML401 (in lowercase, for XHTML compatibility):

<ins><div>...block-level content...</div></ins>

(The example is found here:

As further back-up, I'll mention that agrees with my interpretation of HTML4.01 - if you try to validate the the HTML4 example as XHTML 1.0 Strict in the service, you get the following message:

]] XHTML element div not allowed as child of XHTML element ins in this context. 
   (Suppressing further errors from this subtree.)
   From line 8, column 6; to line 8, column 10
  &#8617;<p>&#8617;<ins><div>...blo [[
Comment 2 Leif Halvard Silli 2010-06-27 16:15:26 UTC
As confirmation of my claim that supports my interpretation, if we change the <ins> in the HTML4.01 example to an <object> element, then stamps it as valid:

<object data="image" type="image/gif" ><div>...block-level content...</div></object>

then the service stamps it as valid HTML401 and valid XHTML1. Brilliant, Henri!
Comment 3 Ville Skyttä 2011-08-23 17:53:15 UTC
The XHTML 1.0 DTD does allow ins and del in h1, so this is not a validator bug.

The HTML 4.01 DTD on the other hand does not.
(ins an del are not in %fontstyle;, %phrase;, %special;, or %formctrl;).