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 12359 - If the content model says it can only contain dt and dd elements then why does it say further down "if a dl contains [...] elements other than dt and dd [...]?
Summary: If the content model says it can only contain dt and dd elements then why doe...
Alias: None
Product: HTML WG
Classification: Unclassified
Component: LC1 HTML5 spec (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
Depends on:
Reported: 2011-03-21 21:44 UTC by contributor
Modified: 2011-08-04 05:13 UTC (History)
7 users (show)

See Also:


Description contributor 2011-03-21 21:44:04 UTC

If the content model says it can only contain dt and dd elements then why does
it say further down "if a dl contains [...] elements other than dt and dd

Posted from:
User agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv: Gecko/20110303 Firefox/3.6.15
Comment 1 Tab Atkins Jr. 2011-03-21 21:53:03 UTC
Because the spec has to describe how to handle invalid markup, too.
Comment 2 Evert 2011-03-24 23:11:34 UTC
Even so, I agree with the poster that this is confusing. At least mention that this applies to invalid code.
Comment 3 Tab Atkins Jr. 2011-03-25 16:10:56 UTC
The entire spec works in this way - it describes the authoring requirements, and then describes the browser requirements about what to do when the code is invalid anyway.

Read the developers version of the spec <> if you want to only see information meant for page authors.
Comment 4 Evert 2011-03-25 16:36:46 UTC
I understand the whole spec works like this, I just think it is somewhat strange that invalid situations are mentioned without stating they are invalid. The invalidity of this situation for example is only noticeable when you compare it to its content model like the poster did, which resulted in his/her confusion.
If I was to write a validator based on this information I wouldn't mark the situation where the dl had an invalid child as invalid because it never says it is anywhere. In fact the text seems to imply that it is possible. The only information I get that it isn't is not clear about it and is ambiguous at best.
Comment 5 Aryeh Gregor 2011-03-25 17:50:02 UTC
If you were to write a validator, I hope you'd read the whole spec, not just refer to one part and take it out of context.  Specifically:

"An HTML element must have contents that match the requirements described in the element's content model."

"Content model:
Zero or more groups each consisting of one or more dt elements followed by one or more dd elements."

However, it would arguably be good to be clearer about this, so I think we should leave the bug open and not try to preempt Ian's decision.
Comment 6 Ian 'Hixie' Hickson 2011-05-08 03:38:00 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:

Status: Rejected
Change Description: no spec change
Rationale: The spec already separates the UA requirements from the authoring conformance criteria  to make that distinction clear, toggle the switch at the top of the page to "Highlight browser rules".

This spec is very carefully written so that you never have to read between the lines. It means exactly what it says and no more. If text says "When the pot contains an apple", it doesn't mean pots are allowed to contain apples. When it says "A pot must only contain an apple", it doesn't mean that software is allowed to give up if it contains something other than an apple.

I could hand-hold the reader throughout the specification, but the thing is already 500+ pages long. It would become absolutely insufferable if it was that verbose.
Comment 7 Evert 2011-05-08 11:56:36 UTC
"When the pot contains an apple" *implies* the pot *can* contain an apple, whether it *may* contain one is left open. I would in such cases think it more clear when it says:
"Should the pot illegally contain an apple..." That way it covers both the described situation and the fact that the situation is not allowed/valid.
But then again, English is not my native language so I'll consent to your trust in the reader. ;-)
Comment 8 Michael[tm] Smith 2011-08-04 05:13:28 UTC
mass-move component to LC1