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>
Status: CLOSED INVALID
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
URL: http://www.w3.org/TR/html401/struct/t...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-27 15:23 UTC by Leif Halvard Silli
Modified: 2011-08-23 18:09 UTC (History)
1 user (show)

See Also:


Attachments

Description Leif Halvard Silli 2010-06-27 15:23:28 UTC
http://www.w3.org/TR/html401/struct/text.html#h-9.4

If we try to validate the following as XHTML1 or HTML4

<h1><h2>Foo</h2></h1>

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: http://lists.w3.org/Archives/Public/public-html/2010Jun/0639.html

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):

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

(The example is found here: http://www.w3.org/TR/html401/struct/text.html#h-9.4)

As further back-up, I'll mention that Validator.nu agrees with my interpretation of HTML4.01 - if you try to validate the the HTML4 example as XHTML 1.0 Strict in the Validator.nu 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 Valdiator.nu supports my interpretation, if we change the <ins> in the HTML4.01 example to an <object> element, then Validator.nu stamps it as valid:

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

then the Validator.nu 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.

http://www.w3.org/TR/xhtml1/dtds.html#dtdentry_xhtml1-strict.dtd_h1
http://www.w3.org/TR/xhtml1/dtds.html#dtdentry_xhtml1-strict.dtd_Inline
http://www.w3.org/TR/xhtml1/dtds.html#dtdentry_xhtml1-strict.dtd_misc.inline

The HTML 4.01 DTD on the other hand does not.

http://www.w3.org/TR/html401/struct/global.html#edef-H1
http://www.w3.org/TR/html401/sgml/dtd.html#inline
(ins an del are not in %fontstyle;, %phrase;, %special;, or %formctrl;).