This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
PROBLEM: The spec defines ‘content type’ like so: “A normative description of what content must be included as children and descendants of the element.” http://www.w3.org/html/wg/drafts/html/master/single-page.html#element-dfn-content-model And like so: “Each element defined in this specification has a content model: a description of the element's expected contents” http://www.w3.org/html/wg/drafts/html/master/single-page.html#element-dfn-content-model However, the exact meaning of such a ”normative description” is not decided by the code but by the result in the DOM: “The contents of an element are its children in the DOM” http://www.w3.org/html/wg/drafts/html/master/single-page.html#concept-html-contents However, for most of the ”standard” content models, this is not a problem. For instance, the meaning of “flow content” is unambiguous. But, viewed from code/author level, then, for “content model: Text”, the meaning varies, see below. This is a gotcha. And should be called out in the the very definition of ”content type: Text”. PROPOSAL: Inside the definition of “content model: Text”, call out that the meaning of ”Text” on the *code level* depends on A. Element kind: Whether the element is a normal element, a raw text element, an escapable raw text element etc B. For some of the element kinds: Whether the element occurs inside XHTML or HTML C. Whether there are "extra constraints" D. May be “whether the contents is an element or an attribute” should be mentioned as a condition. (Currently, the “extra constraints” condition, is the only condition that is mentioned) EXACT TEXT SUGGESTION: ”For elements in HTML, the meaning of “content model: Text” also depends the kind of element. For instance, an ”<” inside <textarea> does not need to be escaped in HTML because it is a raw text element. (This does not apply to XHTML. In XHTML, the kind of element doesn’t affect the meaning of ‘content model: Text’)” JUSTIFICATION: The section on Terminology states: “when the specification states that a feature applies to the HTML syntax or the XHTML syntax, it also includes the other. When a feature specifically only applies to one of the two languages, it is called out by explicitly stating that it does not apply to the other format, as in "for HTML, ... (this does not apply to XHTML)".”
(In reply to comment #0) > EXACT TEXT SUGGESTION: > > ”For elements in HTML, the meaning of “content model: > Text” also depends the kind of element. For instance, > an ”<” inside <textarea> does not need to be escaped > in HTML because it is a raw text element. Correction: “it is a _escapable_ raw text element” > (This does not > apply to XHTML. In XHTML, the kind of element doesn’t > affect the meaning of ‘content model: Text’)”
The report (and comments) of bug 23145 might be helpful when evaluating this bug.
(In reply to comment #1) > (In reply to comment #0) > > > EXACT TEXT SUGGESTION: > > > > ”For elements in HTML, the meaning of Correction: replace ”meaning” with “constraints” > > “content model: > > Text” also depends the kind of element. For instance, > > an ”<” inside <textarea> does not need to be escaped > > in HTML because it is a raw text element. > > Correction: “it is a _escapable_ raw text element” > > > (This does not > > apply to XHTML. In XHTML, the kind of element doesn’t > > affect the meaning of ‘content model: Text’)” Correction: again, replace ”meaning” with “constraints”
(In reply to comment #0) > And like so: > “Each element defined in this specification has a content > model: a description of the element's expected contents” > http://www.w3.org/html/wg/drafts/html/master/single-page.html#element-dfn- > content-model correct URL: http://www.w3.org/html/wg/drafts/html/master/single-page.html#content-models
HTML5.1 Bugzilla Bug Triage: Fixed in PR https://github.com/w3c/html/pull/243 If this resolution is not satisfactory, please copy the relevant bug details/proposal into a new issue at the W3C HTML5 Issue tracker: https://github.com/w3c/html/issues/new where it will be re-triaged. Thanks!