<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>23152</bug_id>
          
          <creation_ts>2013-09-04 09:13:44 +0000</creation_ts>
          <short_desc>Call out that content model: Text, in HTML, depends on the kind of element</short_desc>
          <delta_ts>2016-04-26 21:16:49 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML WG</product>
          <component>HTML5 spec</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://www.w3.org/html/wg/drafts/html/master/single-page.html#text-content</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>editorial</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Leif Halvard Silli">xn--mlform-iua</reporter>
          <assigned_to name="Robin Berjon">robin</assigned_to>
          <cc>faulkner.steve</cc>
    
    <cc>mike</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
    
    <cc>travil</cc>
    
    <cc>xn--mlform-iua</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>92942</commentid>
    <comment_count>0</comment_count>
    <who name="Leif Halvard Silli">xn--mlform-iua</who>
    <bug_when>2013-09-04 09:13:44 +0000</bug_when>
    <thetext>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&apos;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 &quot;extra constraints&quot;
  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 ”&lt;” inside &lt;textarea&gt; 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 &quot;for
    HTML, ... (this does not apply to XHTML)&quot;.”</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92943</commentid>
    <comment_count>1</comment_count>
    <who name="Leif Halvard Silli">xn--mlform-iua</who>
    <bug_when>2013-09-04 09:16:37 +0000</bug_when>
    <thetext>(In reply to comment #0)

&gt; EXACT  TEXT SUGGESTION:
&gt; 
&gt;    ”For elements in HTML, the meaning of “content model: 
&gt;     Text” also depends the kind of element. For instance,
&gt;     an ”&lt;” inside &lt;textarea&gt; does not need to be escaped
&gt;     in HTML because it is a raw text element.

Correction: “it is a _escapable_ raw text element”

&gt;     (This does not
&gt;     apply to XHTML. In XHTML, the kind of element doesn’t
&gt;     affect the meaning of ‘content model: Text’)”</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92947</commentid>
    <comment_count>2</comment_count>
    <who name="Leif Halvard Silli">xn--mlform-iua</who>
    <bug_when>2013-09-04 09:27:17 +0000</bug_when>
    <thetext>The report (and comments) of bug 23145 might be helpful when evaluating this bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92948</commentid>
    <comment_count>3</comment_count>
    <who name="Leif Halvard Silli">xn--mlform-iua</who>
    <bug_when>2013-09-04 09:29:52 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; (In reply to comment #0)
&gt; 
&gt; &gt; EXACT  TEXT SUGGESTION:
&gt; &gt; 
&gt; &gt;    ”For elements in HTML, the meaning of

Correction: replace ”meaning” with “constraints”


&gt; &gt;     “content model: 
&gt; &gt;     Text” also depends the kind of element. For instance,
&gt; &gt;     an ”&lt;” inside &lt;textarea&gt; does not need to be escaped
&gt; &gt;     in HTML because it is a raw text element.
&gt; 
&gt; Correction: “it is a _escapable_ raw text element”
&gt; 
&gt; &gt;     (This does not
&gt; &gt;     apply to XHTML. In XHTML, the kind of element doesn’t
&gt; &gt;     affect the meaning of ‘content model: Text’)”

Correction: again, replace ”meaning” with “constraints”</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92997</commentid>
    <comment_count>4</comment_count>
    <who name="Leif Halvard Silli">xn--mlform-iua</who>
    <bug_when>2013-09-04 18:31:46 +0000</bug_when>
    <thetext>(In reply to comment #0)

&gt;    And like so:
&gt;       “Each element defined in this specification has a content
&gt;        model: a description of the element&apos;s expected contents”
&gt; http://www.w3.org/html/wg/drafts/html/master/single-page.html#element-dfn-
&gt; content-model

correct URL:
http://www.w3.org/html/wg/drafts/html/master/single-page.html#content-models</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126170</commentid>
    <comment_count>5</comment_count>
    <who name="Travis Leithead [MSFT]">travil</who>
    <bug_when>2016-04-26 21:16:49 +0000</bug_when>
    <thetext>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!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>