[Bug 23152] New: Call out that content model: Text, in HTML, depends on the kind of element

https://www.w3.org/Bugs/Public/show_bug.cgi?id=23152

            Bug ID: 23152
           Summary: Call out that content model: Text, in HTML, depends on
                    the kind of element
    Classification: Unclassified
           Product: HTML WG
           Version: unspecified
          Hardware: PC
               URL: http://www.w3.org/html/wg/drafts/html/master/single-pa
                    ge.html#text-content
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HTML5 spec
          Assignee: dave.null@w3.org
          Reporter: xn--mlform-iua@xn--mlform-iua.no
        QA Contact: public-html-bugzilla@w3.org
                CC: mike@w3.org, public-html-admin@w3.org,
                    public-html-wg-issue-tracking@w3.org

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)".”

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Received on Wednesday, 4 September 2013 09:13:51 UTC