[html5] r1373 - /

whatwg at whatwg.org whatwg at whatwg.org
Mon Mar 17 18:43:26 PDT 2008


Author: ianh
Date: 2008-03-17 18:43:26 -0700 (Mon, 17 Mar 2008)
New Revision: 1373

Modified:
   index
   source
Log:
[e] (0) Abstract out the <td> and <th> attribute definitions.

Modified: index
===================================================================
--- index	2008-03-09 02:34:37 UTC (rev 1372)
+++ index	2008-03-18 01:43:26 UTC (rev 1373)
@@ -24,7 +24,7 @@
 
    <h1 id=html-5>HTML 5</h1>
 
-   <h2 class="no-num no-toc" id=working>Working Draft — 9 March 2008</h2>
+   <h2 class="no-num no-toc" id=working>Working Draft — 18 March 2008</h2>
 
    <p>You can take part in this work. <a
     href="http://www.whatwg.org/mailing-list">Join the working group's
@@ -761,14 +761,17 @@
        <li><a href="#the-th"><span class=secno>3.13.10 </span>The
         <code>th</code> element</a>
 
-       <li><a href="#processing"><span class=secno>3.13.11 </span>Processing
+       <li><a href="#attributes0"><span class=secno>3.13.11 </span>Attributes
+        common to <code>td</code> and <code>th</code> elements</a>
+
+       <li><a href="#processing"><span class=secno>3.13.12 </span>Processing
         model</a>
         <ul class=toc>
-         <li><a href="#forming"><span class=secno>3.13.11.1. </span>Forming a
+         <li><a href="#forming"><span class=secno>3.13.12.1. </span>Forming a
           table</a>
 
          <li><a href="#header-and-data-cell-semantics"><span
-          class=secno>3.13.11.2. </span>Forming relationships between data
+          class=secno>3.13.12.2. </span>Forming relationships between data
           cells and header cells</a>
         </ul>
       </ul>
@@ -1544,7 +1547,7 @@
          <li><a href="#end-tags"><span class=secno>8.1.2.2. </span>End
           tags</a>
 
-         <li><a href="#attributes0"><span class=secno>8.1.2.3.
+         <li><a href="#attributes1"><span class=secno>8.1.2.3.
           </span>Attributes</a>
 
          <li><a href="#optional"><span class=secno>8.1.2.4. </span>Optional
@@ -19907,65 +19910,26 @@
 
    <dt>Element-specific attributes:
 
-   <dd><code title=attr-td-colspan><a href="#colspan">colspan</a></code>
+   <dd><code title=attr-tdth-colspan><a href="#colspan">colspan</a></code>
 
-   <dd><code title=attr-td-rowspan><a href="#rowspan">rowspan</a></code>
+   <dd><code title=attr-tdth-rowspan><a href="#rowspan">rowspan</a></code>
 
    <dt>DOM interface:
 
    <dd>
     <pre
-     class=idl>interface <dfn id=htmltablecellelement>HTMLTableCellElement</dfn> : <a href="#htmlelement">HTMLElement</a> {
-           attribute long <a href="#colspan0" title=dom-td-colSpan>colSpan</a>;
-           attribute long <a href="#rowspan0" title=dom-td-rowSpan>rowSpan</a>;
-  readonly attribute long <a href="#cellindex" title=dom-td-cellIndex>cellIndex</a>;
+     class=idl>interface <dfn id=htmltabledatacellelement>HTMLTableDataCellElement</dfn> : <a href="#htmltablecellelement">HTMLTableCellElement</a> {
 };</pre>
   </dl>
 
   <p>The <code><a href="#td">td</a></code> element represents a data <a
    href="#cell" title=concept-cell>cell</a> in a table.
 
-  <p>The <code><a href="#td">td</a></code> element may have a <dfn id=colspan
-   title=attr-td-colspan><code>colspan</code></dfn> content attribute
-   specified, whose value must be a <a href="#valid">valid non-negative
-   integer</a> greater than zero. Its default value, which must be used if <a
-   href="#rules" title="rules for parsing non-negative integers">parsing the
-   attribute as a non-negative integer</a> returns either an error or zero,
-   is 1.
-
-  <p>The <code><a href="#td">td</a></code> element may also have a <dfn
-   id=rowspan title=attr-td-rowspan><code>rowspan</code></dfn> content
-   attribute specified, whose value must be a <a href="#valid">valid
-   non-negative integer</a>. Its default value, which must be used if <a
-   href="#rules" title="rules for parsing non-negative integers">parsing the
-   attribute as a non-negative integer</a> returns an error, is also 1.
-
   <p>The <code><a href="#td">td</a></code> element and its <code
-   title=attr-td-colspan><a href="#colspan">colspan</a></code> and <code
-   title=attr-td-rowspan><a href="#rowspan">rowspan</a></code> attributes
+   title=attr-tdth-colspan><a href="#colspan">colspan</a></code> and <code
+   title=attr-tdth-rowspan><a href="#rowspan">rowspan</a></code> attributes
    take part in the <a href="#table0">table model</a>.
 
-  <p>The <dfn id=colspan0 title=dom-td-colspan><code>colspan</code></dfn> DOM
-   attribute must <a href="#reflect">reflect</a> the content attribute of the
-   same name, with the exception that on setting, if the new value is 0, then
-   an <code>INDEX_SIZE_ERR</code> exception must be raised.
-
-  <p>The <dfn id=rowspan0 title=dom-td-rowspan><code>rowspan</code></dfn> DOM
-   attribute must <a href="#reflect">reflect</a> the content attribute of the
-   same name.
-
-  <p>The <dfn id=cellindex
-   title=dom-td-cellIndex><code>cellIndex</code></dfn> DOM attribute must, if
-   the element has a parent <code><a href="#tr">tr</a></code> element, return
-   the index of the cell's element in the parent element's <code
-   title=dom-tr-cells><a href="#cells">cells</a></code> collection. If there
-   is no such parent element, then the attribute must return 0.
-
-  <p class=big-issue>There has been some suggestion that the <code
-   title="">headers</code> attribute from HTML4, or some other mechanism that
-   is more powerful than <code title="">scope=""</code>, should be included.
-   This has not yet been considered.
-
   <h4 id=the-th><span class=secno>3.13.10 </span>The <dfn
    id=th><code>th</code></dfn> element</h4>
 
@@ -19984,9 +19948,9 @@
 
    <dt>Element-specific attributes:
 
-   <dd><code title=attr-th-colspan><a href="#colspan1">colspan</a></code>
+   <dd><code title=attr-tdth-colspan><a href="#colspan">colspan</a></code>
 
-   <dd><code title=attr-th-rowspan><a href="#rowspan1">rowspan</a></code>
+   <dd><code title=attr-tdth-rowspan><a href="#rowspan">rowspan</a></code>
 
    <dd><code title=attr-th-scope><a href="#scope0">scope</a></code>
 
@@ -20002,21 +19966,6 @@
   <p>The <code><a href="#th">th</a></code> element represents a header <a
    href="#cell" title=concept-cell>cell</a> in a table.
 
-  <p>The <code><a href="#th">th</a></code> element may have a <dfn
-   id=colspan1 title=attr-th-colspan><code>colspan</code></dfn> content
-   attribute specified, whose value must be a <a href="#valid">valid
-   non-negative integer</a> greater than zero. Its default value, which must
-   be used if <a href="#rules" title="rules for parsing non-negative
-   integers">parsing the attribute as a non-negative integer</a> returns
-   either an error or zero, is 1.
-
-  <p>The <code><a href="#th">th</a></code> element may also have a <dfn
-   id=rowspan1 title=attr-th-rowspan><code>rowspan</code></dfn> content
-   attribute specified, whose value must be a <a href="#valid">valid
-   non-negative integer</a>. Its default value, which must be used if <a
-   href="#rules" title="rules for parsing non-negative integers">parsing the
-   attribute as a non-negative integer</a> returns an error, is also 1.
-
   <p>The <code><a href="#th">th</a></code> element may have a <dfn id=scope0
    title=attr-th-scope><code>scope</code></dfn> content attribute specified.
    The <code title=attr-th-scope><a href="#scope0">scope</a></code> attribute
@@ -20065,8 +20014,8 @@
    cells and header cells.
 
   <p>The <code><a href="#th">th</a></code> element and its <code
-   title=attr-th-colspan><a href="#colspan1">colspan</a></code>, <code
-   title=attr-th-rowspan><a href="#rowspan1">rowspan</a></code>, and <code
+   title=attr-tdth-colspan><a href="#colspan">colspan</a></code>, <code
+   title=attr-tdth-rowspan><a href="#rowspan">rowspan</a></code>, and <code
    title=attr-th-scope><a href="#scope0">scope</a></code> attributes take
    part in the <a href="#table0">table model</a>.
 
@@ -20074,15 +20023,57 @@
    attribute must <a href="#reflect">reflect</a> the content attribute of the
    same name.
 
-  <p>The <code><a
-   href="#htmltableheadercellelement">HTMLTableHeaderCellElement</a></code>
-   interface inherits from the <code><a
-   href="#htmltablecellelement">HTMLTableCellElement</a></code> interface and
-   therefore also has the DOM attributes defined above in the <code><a
-   href="#td">td</a></code> section.
+  <h4 id=attributes0><span class=secno>3.13.11 </span>Attributes common to
+   <code><a href="#td">td</a></code> and <code><a href="#th">th</a></code>
+   elements</h4>
 
-  <h4 id=processing><span class=secno>3.13.11 </span>Processing model</h4>
+  <p>The <code><a href="#td">td</a></code> and <code><a
+   href="#th">th</a></code> elements may have a <dfn id=colspan
+   title=attr-tdth-colspan><code>colspan</code></dfn> content attribute
+   specified, whose value must be a <a href="#valid">valid non-negative
+   integer</a> greater than zero. Its default value, which must be used if <a
+   href="#rules" title="rules for parsing non-negative integers">parsing the
+   attribute as a non-negative integer</a> returns either an error or zero,
+   is 1.
 
+  <p>The <code><a href="#td">td</a></code> and <code><a
+   href="#th">th</a></code> elements may also have a <dfn id=rowspan
+   title=attr-tdth-rowspan><code>rowspan</code></dfn> content attribute
+   specified, whose value must be a <a href="#valid">valid non-negative
+   integer</a>. Its default value, which must be used if <a href="#rules"
+   title="rules for parsing non-negative integers">parsing the attribute as a
+   non-negative integer</a> returns an error, is also 1.
+
+  <p>The <code><a href="#td">td</a></code> and <code><a
+   href="#th">th</a></code> elements implement interfaces that inherit from
+   the <code><a href="#htmltablecellelement">HTMLTableCellElement</a></code>
+   interface:
+
+  <pre
+   class=idl>interface <dfn id=htmltablecellelement>HTMLTableCellElement</dfn> : <a href="#htmlelement">HTMLElement</a> {
+           attribute long <span title=dom-td-colSpan>colSpan</span>;
+           attribute long <span title=dom-td-rowSpan>rowSpan</span>;
+  readonly attribute long <span title=dom-td-cellIndex>cellIndex</span>;
+};</pre>
+
+  <p>The <dfn id=colspan0 title=dom-tdth-colspan><code>colspan</code></dfn>
+   DOM attribute must <a href="#reflect">reflect</a> the content attribute of
+   the same name, with the exception that on setting, if the new value is 0,
+   then an <code>INDEX_SIZE_ERR</code> exception must be raised.
+
+  <p>The <dfn id=rowspan0 title=dom-tdth-rowspan><code>rowspan</code></dfn>
+   DOM attribute must <a href="#reflect">reflect</a> the content attribute of
+   the same name.
+
+  <p>The <dfn id=cellindex
+   title=dom-tdth-cellIndex><code>cellIndex</code></dfn> DOM attribute must,
+   if the element has a parent <code><a href="#tr">tr</a></code> element,
+   return the index of the cell's element in the parent element's <code
+   title=dom-tr-cells><a href="#cells">cells</a></code> collection. If there
+   is no such parent element, then the attribute must return 0.
+
+  <h4 id=processing><span class=secno>3.13.12 </span>Processing model</h4>
+
   <p>The various table elements and their content attributes together define
    the <dfn id=table0>table model</dfn>.
 
@@ -20184,7 +20175,7 @@
    represented by <code><a href="#table">table</a></code> elements and their
    descendants. Documents must not have table model errors.
 
-  <h5 id=forming><span class=secno>3.13.11.1. </span>Forming a table</h5>
+  <h5 id=forming><span class=secno>3.13.12.1. </span>Forming a table</h5>
 
   <p>To determine which elements correspond to which slots in a <a
    href="#table1" title=concept-table>table</a> associated with a <code><a
@@ -20670,7 +20661,7 @@
    title=concept-cell>cell</a> anchored to them, then this is a <a
    href="#table2">table model error</a>.
 
-  <h5 id=header-and-data-cell-semantics><span class=secno>3.13.11.2.
+  <h5 id=header-and-data-cell-semantics><span class=secno>3.13.12.2.
    </span>Forming relationships between data cells and header cells</h5>
 
   <p>Each data cell can be assigned zero or more header cells. The <dfn
@@ -37844,13 +37835,13 @@
     characters</a>.
 
    <li>Then, the start tag may have a number of attributes, the <a
-    href="#attributes1" title=syntax-attributes>syntax for which</a> is
+    href="#attributes2" title=syntax-attributes>syntax for which</a> is
     described below. Attributes may be separated from each other by one or
     more <a href="#space" title="space character">space characters</a>.
 
    <li>After the attributes, there may be one or more <a href="#space"
     title="space character">space characters</a>. (Some attributes are
-    required to be followed by a space. See the <a href="#attributes1"
+    required to be followed by a space. See the <a href="#attributes2"
     title=syntax-attributes>attributes section</a> below.)
 
    <li>Then, if the element is one of the void elements, then there may be a
@@ -37884,9 +37875,9 @@
     (<code>></code>) character.
   </ol>
 
-  <h5 id=attributes0><span class=secno>8.1.2.3. </span>Attributes</h5>
+  <h5 id=attributes1><span class=secno>8.1.2.3. </span>Attributes</h5>
 
-  <p><dfn id=attributes1 title=syntax-attributes>Attributes</dfn> for an
+  <p><dfn id=attributes2 title=syntax-attributes>Attributes</dfn> for an
    element are expressed inside the element's start tag.
 
   <p>Attributes have a name and a value. <dfn id=attribute

Modified: source
===================================================================
--- source	2008-03-09 02:34:37 UTC (rev 1372)
+++ source	2008-03-18 01:43:26 UTC (rev 1373)
@@ -17418,14 +17418,11 @@
    <dt>Content model:</dt>
    <dd><span>Flow content</span>.</dd>
    <dt>Element-specific attributes:</dt>
-   <dd><code title="attr-td-colspan">colspan</code></dd>
-   <dd><code title="attr-td-rowspan">rowspan</code></dd>
+   <dd><code title="attr-tdth-colspan">colspan</code></dd>
+   <dd><code title="attr-tdth-rowspan">rowspan</code></dd>
    <dt>DOM interface:</dt>
    <dd>
-    <pre class="idl">interface <dfn>HTMLTableCellElement</dfn> : <span>HTMLElement</span> {
-           attribute long <span title="dom-td-colSpan">colSpan</span>;
-           attribute long <span title="dom-td-rowSpan">rowSpan</span>;
-  readonly attribute long <span title="dom-td-cellIndex">cellIndex</span>;
+    <pre class="idl">interface <dfn>HTMLTableDataCellElement</dfn> : <span>HTMLTableCellElement</span> {
 };</pre>
    </dd>
   </dl>
@@ -17433,49 +17430,12 @@
   <p>The <code>td</code> element represents a data <span
   title="concept-cell">cell</span> in a table.</p>
 
-  <p>The <code>td</code> element may have a <dfn
-  title="attr-td-colspan"><code>colspan</code></dfn> content attribute
-  specified, whose value must be a <span>valid non-negative
-  integer</span> greater than zero. Its default value, which must be
-  used if <span title="rules for parsing non-negative
-  integers">parsing the attribute as a non-negative integer</span>
-  returns either an error or zero, is 1.</p>
-
-  <p>The <code>td</code> element may also have a <dfn
-  title="attr-td-rowspan"><code>rowspan</code></dfn> content attribute
-  specified, whose value must be a <span>valid non-negative
-  integer</span>. Its default value, which must be used if <span
-  title="rules for parsing non-negative integers">parsing the
-  attribute as a non-negative integer</span> returns an error, is also
-  1.</p>
-
   <p>The <code>td</code> element and its <code
-  title="attr-td-colspan">colspan</code> and <code
-  title="attr-td-rowspan">rowspan</code> attributes take part in the
+  title="attr-tdth-colspan">colspan</code> and <code
+  title="attr-tdth-rowspan">rowspan</code> attributes take part in the
   <span>table model</span>.</p>
 
-  <p>The <dfn title="dom-td-colspan"><code>colspan</code></dfn> DOM
-  attribute must <span>reflect</span> the content attribute of the
-  same name, with the exception that on setting, if the new value is
-  0, then an <code>INDEX_SIZE_ERR</code> exception must be raised.</p>
 
-  <p>The <dfn title="dom-td-rowspan"><code>rowspan</code></dfn> DOM
-  attribute must <span>reflect</span> the content attribute of the
-  same name.</p>
-
-  <p>The <dfn title="dom-td-cellIndex"><code>cellIndex</code></dfn>
-  DOM attribute must, if the element has a parent <code>tr</code>
-  element, return the index of the cell's element in the parent
-  element's <code title="dom-tr-cells">cells</code> collection. If
-  there is no such parent element, then the attribute must return
-  0.</p>
-
-  <p class="big-issue">There has been some suggestion that the <code
-  title="">headers</code> attribute from HTML4, or some other
-  mechanism that is more powerful than <code title="">scope=""</code>,
-  should be included. This has not yet been considered.</p>
-
-
   <h4>The <dfn><code>th</code></dfn> element</h4>
 
   <dl class="element">
@@ -17486,8 +17446,8 @@
    <dt>Content model:</dt>
    <dd><span>Phrasing content</span>.</dd>
    <dt>Element-specific attributes:</dt>
-   <dd><code title="attr-th-colspan">colspan</code></dd>
-   <dd><code title="attr-th-rowspan">rowspan</code></dd>
+   <dd><code title="attr-tdth-colspan">colspan</code></dd>
+   <dd><code title="attr-tdth-rowspan">rowspan</code></dd>
    <dd><code title="attr-th-scope">scope</code></dd>
    <dt>DOM interface:</dt>
    <dd>
@@ -17501,22 +17461,6 @@
   title="concept-cell">cell</span> in a table.</p>
 
   <p>The <code>th</code> element may have a <dfn
-  title="attr-th-colspan"><code>colspan</code></dfn> content attribute
-  specified, whose value must be a <span>valid non-negative
-  integer</span> greater than zero. Its default value, which must be
-  used if <span title="rules for parsing non-negative
-  integers">parsing the attribute as a non-negative integer</span>
-  returns either an error or zero, is 1.</p>
-
-  <p>The <code>th</code> element may also have a <dfn
-  title="attr-th-rowspan"><code>rowspan</code></dfn> content attribute
-  specified, whose value must be a <span>valid non-negative
-  integer</span>. Its default value, which must be used if <span
-  title="rules for parsing non-negative integers">parsing the
-  attribute as a non-negative integer</span> returns an error, is also
-  1.</p>
-
-  <p>The <code>th</code> element may have a <dfn
   title="attr-th-scope"><code>scope</code></dfn> content attribute
   specified. The <code title="attr-th-scope">scope</code> attribute is
   an <span>enumerated attribute</span> with five states, four of which
@@ -17566,8 +17510,8 @@
   data cells and header cells.</p>
 
   <p>The <code>th</code> element and its <code
-  title="attr-th-colspan">colspan</code>, <code
-  title="attr-th-rowspan">rowspan</code>, and <code
+  title="attr-tdth-colspan">colspan</code>, <code
+  title="attr-tdth-rowspan">rowspan</code>, and <code
   title="attr-th-scope">scope</code> attributes take part in the
   <span>table model</span>.</p>
 
@@ -17575,12 +17519,52 @@
   attribute must <span>reflect</span> the content attribute of the
   same name.</p>
 
-  <p>The <code>HTMLTableHeaderCellElement</code> interface inherits
-  from the <code>HTMLTableCellElement</code> interface and therefore
-  also has the DOM attributes defined above in the <code>td</code>
-  section.</p>
 
+  <h4>Attributes common to <code>td</code> and <code>th</code> elements</h4>
 
+  <p>The <code>td</code> and <code>th</code> elements may have a <dfn
+  title="attr-tdth-colspan"><code>colspan</code></dfn> content
+  attribute specified, whose value must be a <span>valid non-negative
+  integer</span> greater than zero. Its default value, which must be
+  used if <span title="rules for parsing non-negative
+  integers">parsing the attribute as a non-negative integer</span>
+  returns either an error or zero, is 1.</p>
+
+  <p>The <code>td</code> and <code>th</code> elements may also have a
+  <dfn title="attr-tdth-rowspan"><code>rowspan</code></dfn> content
+  attribute specified, whose value must be a <span>valid non-negative
+  integer</span>. Its default value, which must be used if <span
+  title="rules for parsing non-negative integers">parsing the
+  attribute as a non-negative integer</span> returns an error, is also
+  1.</p>
+
+  <p>The <code>td</code> and <code>th</code> elements implement
+  interfaces that inherit from the <code>HTMLTableCellElement</code>
+  interface:</p>
+
+  <pre class="idl">interface <dfn>HTMLTableCellElement</dfn> : <span>HTMLElement</span> {
+           attribute long <span title="dom-td-colSpan">colSpan</span>;
+           attribute long <span title="dom-td-rowSpan">rowSpan</span>;
+  readonly attribute long <span title="dom-td-cellIndex">cellIndex</span>;
+};</pre>
+
+  <p>The <dfn title="dom-tdth-colspan"><code>colspan</code></dfn> DOM
+  attribute must <span>reflect</span> the content attribute of the
+  same name, with the exception that on setting, if the new value is
+  0, then an <code>INDEX_SIZE_ERR</code> exception must be raised.</p>
+
+  <p>The <dfn title="dom-tdth-rowspan"><code>rowspan</code></dfn> DOM
+  attribute must <span>reflect</span> the content attribute of the
+  same name.</p>
+
+  <p>The <dfn title="dom-tdth-cellIndex"><code>cellIndex</code></dfn>
+  DOM attribute must, if the element has a parent <code>tr</code>
+  element, return the index of the cell's element in the parent
+  element's <code title="dom-tr-cells">cells</code> collection. If
+  there is no such parent element, then the attribute must return
+  0.</p>
+
+
   <h4>Processing model</h4>
 
   <p>The various table elements and their content attributes together




More information about the Commit-Watchers mailing list