[html5] r1375 - /
whatwg at whatwg.org
whatwg at whatwg.org
Tue Mar 18 15:13:12 PDT 2008
Author: ianh
Date: 2008-03-18 15:13:11 -0700 (Tue, 18 Mar 2008)
New Revision: 1375
Modified:
index
source
Log:
[] (0) Add support for headers='' to the table model.
Modified: index
===================================================================
--- index 2008-03-18 01:48:17 UTC (rev 1374)
+++ index 2008-03-18 22:13:11 UTC (rev 1375)
@@ -19914,22 +19914,45 @@
<dd><code title=attr-tdth-rowspan><a href="#rowspan">rowspan</a></code>
+ <dd><code title=attr-td-headers><a href="#headers">headers</a></code>
+
<dt>DOM interface:
<dd>
<pre
class=idl>interface <dfn id=htmltabledatacellelement>HTMLTableDataCellElement</dfn> : <a href="#htmltablecellelement">HTMLTableCellElement</a> {
+ attribute DOMString <a href="#headers0" title=dom-td-headers>headers</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="#th">th</a></code> element may have a <dfn id=headers
+ title=attr-td-headers><code>headers</code></dfn> content attribute
+ specified. The <code title=attr-td-headers><a
+ href="#headers">headers</a></code> attribute, if specified, must contain a
+ string consisting of an <a href="#unordered">unordered set of unique
+ space-separated tokens</a>, each of which must have the value of an ID of
+ a <code><a href="#th">th</a></code> element taking part in the same <a
+ href="#table1" title=concept-table>table</a> as the <code><a
+ href="#td">td</a></code> element (as defined by the <a
+ href="#table0">table model</a>).
+
+ <p>The exact effect of the attribute is described in detail in the <a
+ href="#algorithm2">algorithm for assigning header cells to data cells</a>,
+ which user agents must apply to determine the relationships between data
+ cells and header cells.
+
<p>The <code><a href="#td">td</a></code> element and its <code
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=headers0 title=dom-td-headers><code>headers</code></dfn> DOM
+ attribute must <a href="#reflect">reflect</a> the content attribute of the
+ same name.
+
<h4 id=the-th><span class=secno>3.13.10 </span>The <dfn
id=th><code>th</code></dfn> element</h4>
@@ -20014,10 +20037,9 @@
cells and header cells.
<p>The <code><a href="#th">th</a></code> element and its <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>.
+ 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=scope1 title=dom-th-scope><code>scope</code></dfn> DOM
attribute must <a href="#reflect">reflect</a> the content attribute of the
@@ -20668,119 +20690,185 @@
id=algorithm2>algorithm for assigning header cells to data cells</dfn> is
as follows.
- <p>For each header cell in the table, in <a href="#tree-order">tree
- order</a>:
-
<ol>
<li>
- <p>Let (<var title="">header<sub title="">x</sub></var>, <var
- title="">header<sub title="">y</sub></var>) be the coordinate of the
- slot to which the header cell is anchored.</p>
+ <p>For each header cell in the table, in <a href="#tree-order">tree
+ order</a>, run these substeps:</p>
- <li>
- <p>Examine the <code title=attr-th-scope><a
- href="#scope0">scope</a></code> attribute of the <code><a
- href="#th">th</a></code> element corresponding to the header cell, and,
- based on its state, apply the appropriate substep:</p>
+ <ol>
+ <li>
+ <p>Let (<var title="">header<sub title="">x</sub></var>, <var
+ title="">header<sub title="">y</sub></var>) be the coordinate of the
+ slot to which the header cell is anchored.</p>
- <dl class=switch>
- <dt>If it is in the <em title=attr-th-scope-row><a
- href="#row">row</a></em> state
+ <li>
+ <p>Examine the <code title=attr-th-scope><a
+ href="#scope0">scope</a></code> attribute of the <code><a
+ href="#th">th</a></code> element corresponding to the header cell,
+ and, based on its state, apply the appropriate substep:</p>
+ <!-- XXX this entire switch statement should be changed around
+ so that it just defines the area to assign headers in, and the
+ direction to do the assigning in, and then defers to a set of
+ steps below it that then does the assigning. Then, we can
+ support colspaning/rowspaning headers and can stop when we hit
+ other headers, if we want to do that. -->
+
+ <dl class=switch>
+ <dt>If it is in the <em title=attr-th-scope-row><a
+ href="#row">row</a></em> state
- <dd>
- <p>Assign the header cell to any data cells anchored at slots with
- coordinates (<var title="">data<sub title="">x</sub></var>, <var
- title="">data<sub title="">y</sub></var>) where <span><var
- title="">header<sub title="">x</sub></var> < <var
- title="">data<sub title="">x</sub></var> ≤ <var
- title="">x<sub title="">max</sub></var></span> and <span><var
- title="">data<sub title="">y</sub></var> = <var
- title="">header<sub title="">y</sub></var></span>.</p>
+ <dd>
+ <p>Assign the header cell to any data cells anchored at slots with
+ coordinates (<var title="">data<sub title="">x</sub></var>, <var
+ title="">data<sub title="">y</sub></var>) where <span><var
+ title="">header<sub title="">x</sub></var> < <var
+ title="">data<sub title="">x</sub></var> ≤ <var
+ title="">x<sub title="">max</sub></var></span> and <span><var
+ title="">data<sub title="">y</sub></var> = <var
+ title="">header<sub title="">y</sub></var></span>, except for any
+ data cells corresponding to <code><a href="#td">td</a></code>
+ elements that have a <code title=attr-td-headers><a
+ href="#headers">headers</a></code> attribute specified.</p>
- <dt>If it is in the <em title=attr-th-scope-col><a
- href="#col0">column</a></em> state
+ <dt>If it is in the <em title=attr-th-scope-col><a
+ href="#col0">column</a></em> state
- <dd>
- <p>Assign the header cell to any data cells anchored at slots with
- coordinates (<var title="">data<sub title="">x</sub></var>, <var
- title="">data<sub title="">y</sub></var>) where <span><var
- title="">data<sub title="">x</sub></var> = <var
- title="">header<sub title="">x</sub></var></span> and <span><var
- title="">header<sub title="">y</sub></var> < <var
- title="">data<sub title="">y</sub></var> ≤ <var
- title="">y<sub title="">max</sub></var></span>.</p>
+ <dd>
+ <p>Assign the header cell to any data cells anchored at slots with
+ coordinates (<var title="">data<sub title="">x</sub></var>, <var
+ title="">data<sub title="">y</sub></var>) where <span><var
+ title="">data<sub title="">x</sub></var> = <var
+ title="">header<sub title="">x</sub></var></span> and <span><var
+ title="">header<sub title="">y</sub></var> < <var
+ title="">data<sub title="">y</sub></var> ≤ <var
+ title="">y<sub title="">max</sub></var></span>, except for any data
+ cells corresponding to <code><a href="#td">td</a></code> elements
+ that have a <code title=attr-td-headers><a
+ href="#headers">headers</a></code> attribute specified.</p>
- <dt>If it is in the <em title=attr-th-scope-rowgroup><a
- href="#rowgroup">row group</a></em> state
+ <dt>If it is in the <em title=attr-th-scope-rowgroup><a
+ href="#rowgroup">row group</a></em> state
- <dd>
- <p>If the header cell is not in a <a href="#row-group"
- title=concept-row-group>row group</a>, then don't assign the header
- cell to any data cells.</p>
+ <dd>
+ <p>If the header cell is not in a <a href="#row-group"
+ title=concept-row-group>row group</a>, then don't assign the header
+ cell to any data cells.</p>
- <p>Otherwise, let (1, <var title="">group<sub title="">y</sub></var>)
- be the slot at which the row group is anchored, let <var
- title="">height</var> be the number of rows in the row group, and
- assign the header cell to any data cells anchored at slots with
- coordinates (<var title="">data<sub title="">x</sub></var>, <var
- title="">data<sub title="">y</sub></var>) where <span><var
- title="">header<sub title="">x</sub></var> ≤ <var
- title="">data<sub title="">x</sub></var> ≤ <var
- title="">x<sub title="">max</sub></var></span> and <span><var
- title="">header<sub title="">y</sub></var> ≤ <var
- title="">data<sub title="">y</sub></var> < <var
- title="">group<sub title="">y</sub></var>+<var
- title="">height</var></span>.</p>
+ <p>Otherwise, let (1, <var title="">group<sub title="">y</sub></var>)
+ be the slot at which the row group is anchored, let <var
+ title="">height</var> be the number of rows in the row group, and
+ assign the header cell to any data cells anchored at slots with
+ coordinates (<var title="">data<sub title="">x</sub></var>, <var
+ title="">data<sub title="">y</sub></var>) where <span><var
+ title="">header<sub title="">x</sub></var> ≤ <var
+ title="">data<sub title="">x</sub></var> ≤ <var
+ title="">x<sub title="">max</sub></var></span> and <span><var
+ title="">header<sub title="">y</sub></var> ≤ <var
+ title="">data<sub title="">y</sub></var> < <var
+ title="">group<sub title="">y</sub></var>+<var
+ title="">height</var></span>, except for any data cells
+ corresponding to <code><a href="#td">td</a></code> elements that
+ have a <code title=attr-td-headers><a
+ href="#headers">headers</a></code> attribute specified.</p>
- <dt>If it is in the <em title=attr-th-scope-colgroup><a
- href="#colgroup0">column group</a></em> state
+ <dt>If it is in the <em title=attr-th-scope-colgroup><a
+ href="#colgroup0">column group</a></em> state
- <dd>
- <p>If the header cell is not in a <a href="#column0"
- title=concept-column-group>column group</a>, then don't assign the
- header cell to any data cells.</p>
+ <dd>
+ <p>If the header cell is not in a <a href="#column0"
+ title=concept-column-group>column group</a>, then don't assign the
+ header cell to any data cells.</p>
- <p>Otherwise, let (<var title="">group<sub title="">x</sub></var>, 1)
- be the slot at which the column group is anchored, let <var
- title="">width</var> be the number of columns in the column group, and
- assign the header cell to any data cells anchored at slots with
- coordinates (<var title="">data<sub title="">x</sub></var>, <var
- title="">data<sub title="">y</sub></var>) where <span><var
- title="">header<sub title="">x</sub></var> ≤ <var
- title="">data<sub title="">x</sub></var> < <var
- title="">group<sub title="">x</sub></var>+<var
- title="">width</var></span> and <span><var title="">header<sub
- title="">y</sub></var> ≤ <var title="">data<sub
- title="">y</sub></var> ≤ <var title="">y<sub
- title="">max</sub></var></span>.</p>
+ <p>Otherwise, let (<var title="">group<sub title="">x</sub></var>, 1)
+ be the slot at which the column group is anchored, let <var
+ title="">width</var> be the number of columns in the column group,
+ and assign the header cell to any data cells anchored at slots with
+ coordinates (<var title="">data<sub title="">x</sub></var>, <var
+ title="">data<sub title="">y</sub></var>) where <span><var
+ title="">header<sub title="">x</sub></var> ≤ <var
+ title="">data<sub title="">x</sub></var> < <var
+ title="">group<sub title="">x</sub></var>+<var
+ title="">width</var></span> and <span><var title="">header<sub
+ title="">y</sub></var> ≤ <var title="">data<sub
+ title="">y</sub></var> ≤ <var title="">y<sub
+ title="">max</sub></var></span>, except for any data cells
+ corresponding to <code><a href="#td">td</a></code> elements that
+ have a <code title=attr-td-headers><a
+ href="#headers">headers</a></code> attribute specified.</p>
- <dt>Otherwise, it is in the <em title="">auto</em> state
+ <dt>Otherwise, it is in the <em title="">auto</em> state
- <dd>
- <p>If the header cell is not in the first row of the table, or not in
- the first cell of a row, then don't assign the header cell to any data
- cells.</p>
+ <dd>
+ <p>If the header cell is not in the first row of the table, or not in
+ the first cell of a row, then don't assign the header cell to any
+ data cells.</p>
- <p>Otherwise, if the header cell is in the first row of the table,
- assign the header cell to any data cells anchored at slots with
- coordinates (<var title="">data<sub title="">x</sub></var>, <var
- title="">data<sub title="">y</sub></var>) where <span><var
- title="">data<sub title="">x</sub></var> = <var
- title="">header<sub title="">x</sub></var></span> and <span><var
- title="">header<sub title="">y</sub></var> < <var
- title="">data<sub title="">y</sub></var> ≤ <var
- title="">y<sub title="">max</sub></var></span>.</p>
+ <p class=big-issue>This is shortly to be made better and more
+ magical.</p>
- <p>Otherwise, the header cell is in the first column of the table;
- assign the header cell to any data cells anchored at slots with
- coordinates (<var title="">data<sub title="">x</sub></var>, <var
- title="">data<sub title="">y</sub></var>) where <span><var
- title="">header<sub title="">x</sub></var> < <var
- title="">data<sub title="">x</sub></var> ≤ <var
- title="">x<sub title="">max</sub></var></span> and <span><var
- title="">data<sub title="">y</sub></var> = <var
- title="">header<sub title="">y</sub></var></span>.</p>
- </dl>
+ <p>Otherwise, if the header cell is in the first row of the table,
+ assign the header cell to any data cells anchored at slots with
+ coordinates (<var title="">data<sub title="">x</sub></var>, <var
+ title="">data<sub title="">y</sub></var>) where <span><var
+ title="">data<sub title="">x</sub></var> = <var
+ title="">header<sub title="">x</sub></var></span> and <span><var
+ title="">header<sub title="">y</sub></var> < <var
+ title="">data<sub title="">y</sub></var> ≤ <var
+ title="">y<sub title="">max</sub></var></span>, except for any data
+ cells corresponding to <code><a href="#td">td</a></code> elements
+ that have a <code title=attr-td-headers><a
+ href="#headers">headers</a></code> attribute specified.</p>
+
+ <p>Otherwise, the header cell is in the first column of the table;
+ assign the header cell to any data cells anchored at slots with
+ coordinates (<var title="">data<sub title="">x</sub></var>, <var
+ title="">data<sub title="">y</sub></var>) where <span><var
+ title="">header<sub title="">x</sub></var> < <var
+ title="">data<sub title="">x</sub></var> ≤ <var
+ title="">x<sub title="">max</sub></var></span> and <span><var
+ title="">data<sub title="">y</sub></var> = <var
+ title="">header<sub title="">y</sub></var></span>, except for any
+ data cells corresponding to <code><a href="#td">td</a></code>
+ elements that have a <code title=attr-td-headers><a
+ href="#headers">headers</a></code> attribute specified.</p>
+ </dl>
+ </ol>
+
+ <li>
+ <p>For each data cell in the table, in <a href="#tree-order">tree
+ order</a>, run these substeps:</p>
+
+ <ol>
+ <li>
+ <p>If the data cell corresponds to a <code><a href="#td">td</a></code>
+ element that does not have a <code title=attr-td-headers><a
+ href="#headers">headers</a></code> attribute specified, then skip
+ these substeps and move on to the next data cell (if any).</p>
+
+ <li>
+ <p>Otherwise, take the value of the <code title=attr-td-headers><a
+ href="#headers">headers</a></code> attribute and <a href="#split"
+ title="split a string on spaces">split it on spaces</a>, letting <var
+ title="">id list</var> be the list of tokens obtained.</p>
+
+ <li> <!-- XXX if nothing was added to this subalgorithm, then make it
+ a single paragraph instead of a nested list. -->
+
+ <p>For each token in the <var title="">id list</var>, run the following
+ steps:</p>
+
+ <ol>
+ <li>
+ <p>Let <var title="">id</var> be the token.
+
+ <li>
+ <p>If there is a header cell in the <a href="#table1"
+ title=concept-table>table</a> whose corresponding <code><a
+ href="#th">th</a></code> element has an ID that is equal to the
+ value of <var title="">id</var>, then assign that header cell to the
+ data cell.
+ </ol>
+ </ol>
</ol>
<h3 id=forms><span class=secno>3.14 </span>Forms</h3>
Modified: source
===================================================================
--- source 2008-03-18 01:48:17 UTC (rev 1374)
+++ source 2008-03-18 22:13:11 UTC (rev 1375)
@@ -17420,9 +17420,11 @@
<dt>Element-specific attributes:</dt>
<dd><code title="attr-tdth-colspan">colspan</code></dd>
<dd><code title="attr-tdth-rowspan">rowspan</code></dd>
+ <dd><code title="attr-td-headers">headers</code></dd>
<dt>DOM interface:</dt>
<dd>
<pre class="idl">interface <dfn>HTMLTableDataCellElement</dfn> : <span>HTMLTableCellElement</span> {
+ attribute DOMString <span title="dom-td-headers">headers</span>;
};</pre>
</dd>
</dl>
@@ -17430,12 +17432,31 @@
<p>The <code>td</code> element represents a data <span
title="concept-cell">cell</span> in a table.</p>
+ <p>The <code>th</code> element may have a <dfn
+ title="attr-td-headers"><code>headers</code></dfn> content attribute
+ specified. The <code title="attr-td-headers">headers</code>
+ attribute, if specified, must contain a string consisting of an
+ <span>unordered set of unique space-separated tokens</span>, each of
+ which must have the value of an ID of a <code>th</code> element
+ taking part in the same <span title="concept-table">table</span> as
+ the <code>td</code> element (as defined by the <span>table
+ model</span>).</p>
+
+ <p>The exact effect of the attribute is described in detail in the
+ <span>algorithm for assigning header cells to data cells</span>,
+ which user agents must apply to determine the relationships between
+ data cells and header cells.</p>
+
<p>The <code>td</code> element and its <code
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-headers"><code>headers</code></dfn> DOM
+ attribute must <span>reflect</span> the content attribute of the
+ same name.</p>
+
<h4>The <dfn><code>th</code></dfn> element</h4>
<dl class="element">
@@ -17510,9 +17531,8 @@
data cells and header cells.</p>
<p>The <code>th</code> element and its <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
+ 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-th-scope"><code>scope</code></dfn> DOM
@@ -18352,153 +18372,245 @@
<span>table model error</span>.</p>
+
<h5 id="header-and-data-cell-semantics">Forming relationships between data cells and header cells</h5>
<p>Each data cell can be assigned zero or more header cells. The
<dfn>algorithm for assigning header cells to data cells</dfn> is as
follows.</p>
- <p>For each header cell in the table, in <span>tree
- order</span>:</p>
-
<ol>
<li>
- <p>Let (<var title="">header<sub title="">x</sub></var>, <var
- title="">header<sub title="">y</sub></var>) be the coordinate of
- the slot to which the header cell is anchored.</p>
+ <p>For each header cell in the table, in <span>tree order</span>,
+ run these substeps:</p>
- </li>
+ <ol>
- <li>
+ <li>
- <p>Examine the <code title="attr-th-scope">scope</code> attribute
- of the <code>th</code> element corresponding to the header cell,
- and, based on its state, apply the appropriate substep:</p>
+ <p>Let (<var title="">header<sub title="">x</sub></var>, <var
+ title="">header<sub title="">y</sub></var>) be the coordinate of
+ the slot to which the header cell is anchored.</p>
- <dl class="switch">
+ </li>
- <dt>If it is in the <em title="attr-th-scope-row">row</em> state</dt>
+ <li>
- <dd>
+ <p>Examine the <code title="attr-th-scope">scope</code>
+ attribute of the <code>th</code> element corresponding to the
+ header cell, and, based on its state, apply the appropriate
+ substep:</p>
- <p>Assign the header cell to any data cells anchored at slots
- with coordinates (<var title="">data<sub title="">x</sub></var>,
- <var title="">data<sub title="">y</sub></var>) where <span><var
- title="">header<sub title="">x</sub></var> < <var
- title="">data<sub title="">x</sub></var> ≤ <var
- title="">x<sub title="">max</sub></var></span> and <span><var
- title="">data<sub title="">y</sub></var> = <var
- title="">header<sub title="">y</sub></var></span>.</p>
+ <!-- XXX this entire switch statement should be changed around
+ so that it just defines the area to assign headers in, and the
+ direction to do the assigning in, and then defers to a set of
+ steps below it that then does the assigning. Then, we can
+ support colspaning/rowspaning headers and can stop when we hit
+ other headers, if we want to do that. -->
- </dd>
+ <dl class="switch">
- <dt>If it is in the <em title="attr-th-scope-col">column</em> state</dt>
+ <dt>If it is in the <em title="attr-th-scope-row">row</em> state</dt>
- <dd>
+ <dd>
- <p>Assign the header cell to any data cells anchored at slots
- with coordinates (<var title="">data<sub title="">x</sub></var>,
- <var title="">data<sub title="">y</sub></var>) where <span><var
- title="">data<sub title="">x</sub></var> = <var
- title="">header<sub title="">x</sub></var></span> and <span><var
- title="">header<sub title="">y</sub></var> < <var
- title="">data<sub title="">y</sub></var> ≤ <var
- title="">y<sub title="">max</sub></var></span>.</p>
+ <p>Assign the header cell to any data cells anchored at slots
+ with coordinates (<var title="">data<sub
+ title="">x</sub></var>, <var title="">data<sub
+ title="">y</sub></var>) where <span><var title="">header<sub
+ title="">x</sub></var> < <var title="">data<sub
+ title="">x</sub></var> ≤ <var title="">x<sub
+ title="">max</sub></var></span> and <span><var
+ title="">data<sub title="">y</sub></var> = <var
+ title="">header<sub title="">y</sub></var></span>, except for
+ any data cells corresponding to <code>td</code> elements that
+ have a <code title="attr-td-headers">headers</code> attribute
+ specified.</p>
- </dd>
+ </dd>
- <dt>If it is in the <em title="attr-th-scope-rowgroup">row group</em> state</dt>
+ <dt>If it is in the <em title="attr-th-scope-col">column</em> state</dt>
- <dd>
+ <dd>
- <p>If the header cell is not in a <span
- title="concept-row-group">row group</span>, then don't assign
- the header cell to any data cells.</p>
+ <p>Assign the header cell to any data cells anchored at slots
+ with coordinates (<var title="">data<sub
+ title="">x</sub></var>, <var title="">data<sub
+ title="">y</sub></var>) where <span><var title="">data<sub
+ title="">x</sub></var> = <var title="">header<sub
+ title="">x</sub></var></span> and <span><var
+ title="">header<sub title="">y</sub></var> < <var
+ title="">data<sub title="">y</sub></var> ≤ <var
+ title="">y<sub title="">max</sub></var></span>, except for any
+ data cells corresponding to <code>td</code> elements that have
+ a <code title="attr-td-headers">headers</code> attribute
+ specified.</p>
- <p>Otherwise, let (1, <var title="">group<sub
- title="">y</sub></var>) be the slot at which the row group is
- anchored, let <var title="">height</var> be the number of rows
- in the row group, and assign the header cell to any data cells
- anchored at slots with coordinates (<var title="">data<sub
- title="">x</sub></var>, <var title="">data<sub
- title="">y</sub></var>) where <span><var title="">header<sub
- title="">x</sub></var> ≤ <var title="">data<sub
- title="">x</sub></var> ≤ <var title="">x<sub
- title="">max</sub></var></span> and <span><var
- title="">header<sub title="">y</sub></var> ≤ <var
- title="">data<sub title="">y</sub></var> < <var
- title="">group<sub title="">y</sub></var>+<var
- title="">height</var></span>.</p>
+ </dd>
- </dd>
+ <dt>If it is in the <em title="attr-th-scope-rowgroup">row group</em> state</dt>
- <dt>If it is in the <em title="attr-th-scope-colgroup">column group</em> state</dt>
+ <dd>
- <dd>
+ <p>If the header cell is not in a <span
+ title="concept-row-group">row group</span>, then don't assign
+ the header cell to any data cells.</p>
- <p>If the header cell is not in a <span
- title="concept-column-group">column group</span>, then don't
- assign the header cell to any data cells.</p>
+ <p>Otherwise, let (1, <var title="">group<sub
+ title="">y</sub></var>) be the slot at which the row group is
+ anchored, let <var title="">height</var> be the number of rows
+ in the row group, and assign the header cell to any data cells
+ anchored at slots with coordinates (<var title="">data<sub
+ title="">x</sub></var>, <var title="">data<sub
+ title="">y</sub></var>) where <span><var title="">header<sub
+ title="">x</sub></var> ≤ <var title="">data<sub
+ title="">x</sub></var> ≤ <var title="">x<sub
+ title="">max</sub></var></span> and <span><var
+ title="">header<sub title="">y</sub></var> ≤ <var
+ title="">data<sub title="">y</sub></var> < <var
+ title="">group<sub title="">y</sub></var>+<var
+ title="">height</var></span>, except for any data cells
+ corresponding to <code>td</code> elements that have a <code
+ title="attr-td-headers">headers</code> attribute
+ specified.</p>
- <p>Otherwise, let (<var title="">group<sub
- title="">x</sub></var>, 1) be the slot at which the column group
- is anchored, let <var title="">width</var> be the number of
- columns in the column group, and assign the header cell to any
- data cells anchored at slots with coordinates (<var
- title="">data<sub title="">x</sub></var>, <var title="">data<sub
- title="">y</sub></var>) where <span><var title="">header<sub
- title="">x</sub></var> ≤ <var title="">data<sub
- title="">x</sub></var> < <var title="">group<sub
- title="">x</sub></var>+<var title="">width</var></span> and
- <span><var title="">header<sub
- title="">y</sub></var> ≤ <var title="">data<sub
- title="">y</sub></var> ≤ <var title="">y<sub
- title="">max</sub></var></span>.</p>
+ </dd>
- </dd>
+ <dt>If it is in the <em title="attr-th-scope-colgroup">column group</em> state</dt>
- <dt>Otherwise, it is in the <em title="">auto</em> state</dt>
+ <dd>
- <dd>
+ <p>If the header cell is not in a <span
+ title="concept-column-group">column group</span>, then don't
+ assign the header cell to any data cells.</p>
- <p>If the header cell is not in the first row of the table, or
- not in the first cell of a row, then don't assign the header
- cell to any data cells.</p>
+ <p>Otherwise, let (<var title="">group<sub
+ title="">x</sub></var>, 1) be the slot at which the column
+ group is anchored, let <var title="">width</var> be the number
+ of columns in the column group, and assign the header cell to
+ any data cells anchored at slots with coordinates (<var
+ title="">data<sub title="">x</sub></var>, <var
+ title="">data<sub title="">y</sub></var>) where <span><var
+ title="">header<sub title="">x</sub></var> ≤ <var
+ title="">data<sub title="">x</sub></var> < <var
+ title="">group<sub title="">x</sub></var>+<var
+ title="">width</var></span> and <span><var title="">header<sub
+ title="">y</sub></var> ≤ <var title="">data<sub
+ title="">y</sub></var> ≤ <var title="">y<sub
+ title="">max</sub></var></span>, except for any data cells
+ corresponding to <code>td</code> elements that have a <code
+ title="attr-td-headers">headers</code> attribute
+ specified.</p>
- <p>Otherwise, if the header cell is in the first row of the
- table, assign the header cell to any data cells anchored at
- slots with coordinates (<var title="">data<sub
- title="">x</sub></var>, <var title="">data<sub
- title="">y</sub></var>) where <span><var title="">data<sub
- title="">x</sub></var> = <var title="">header<sub
- title="">x</sub></var></span> and <span><var title="">header<sub
- title="">y</sub></var> < <var title="">data<sub
- title="">y</sub></var> ≤ <var title="">y<sub
- title="">max</sub></var></span>.</p>
+ </dd>
- <p>Otherwise, the header cell is in the first column of the
- table; assign the header cell to any data cells anchored at
- slots with coordinates (<var title="">data<sub
- title="">x</sub></var>, <var title="">data<sub
- title="">y</sub></var>) where <span><var title="">header<sub
- title="">x</sub></var> < <var title="">data<sub
- title="">x</sub></var> ≤ <var title="">x<sub
- title="">max</sub></var></span> and <span><var title="">data<sub
- title="">y</sub></var> = <var title="">header<sub
- title="">y</sub></var></span>.</p>
+ <dt>Otherwise, it is in the <em title="">auto</em> state</dt>
- </dd>
+ <dd>
- </dl>
+ <p>If the header cell is not in the first row of the table, or
+ not in the first cell of a row, then don't assign the header
+ cell to any data cells.</p>
+ <p class="big-issue">This is shortly to be made better and
+ more magical.</p>
+
+ <p>Otherwise, if the header cell is in the first row of the
+ table, assign the header cell to any data cells anchored at
+ slots with coordinates (<var title="">data<sub
+ title="">x</sub></var>, <var title="">data<sub
+ title="">y</sub></var>) where <span><var title="">data<sub
+ title="">x</sub></var> = <var title="">header<sub
+ title="">x</sub></var></span> and <span><var
+ title="">header<sub title="">y</sub></var> < <var
+ title="">data<sub title="">y</sub></var> ≤ <var
+ title="">y<sub title="">max</sub></var></span>, except for any
+ data cells corresponding to <code>td</code> elements that have
+ a <code title="attr-td-headers">headers</code> attribute
+ specified.</p>
+
+ <p>Otherwise, the header cell is in the first column of the
+ table; assign the header cell to any data cells anchored at
+ slots with coordinates (<var title="">data<sub
+ title="">x</sub></var>, <var title="">data<sub
+ title="">y</sub></var>) where <span><var title="">header<sub
+ title="">x</sub></var> < <var title="">data<sub
+ title="">x</sub></var> ≤ <var title="">x<sub
+ title="">max</sub></var></span> and <span><var
+ title="">data<sub title="">y</sub></var> = <var
+ title="">header<sub title="">y</sub></var></span>, except for
+ any data cells corresponding to <code>td</code> elements that
+ have a <code title="attr-td-headers">headers</code> attribute
+ specified.</p>
+
+ </dd>
+
+ </dl>
+
+ </li>
+
+ </ol>
+
</li>
+ <li>
+
+ <p>For each data cell in the table, in <span>tree order</span>,
+ run these substeps:</p>
+
+ <ol>
+
+ <li>
+
+ <p>If the data cell corresponds to a <code>td</code> element
+ that does not have a <code
+ title="attr-td-headers">headers</code> attribute specified, then
+ skip these substeps and move on to the next data cell (if
+ any).</p>
+
+ </li>
+
+ <li>
+
+ <p>Otherwise, take the value of the <code
+ title="attr-td-headers">headers</code> attribute and <span
+ title="split a string on spaces">split it on spaces</span>,
+ letting <var title="">id list</var> be the list of tokens
+ obtained.</p>
+
+ </li>
+
+ <li>
+
+ <!-- XXX if nothing was added to this subalgorithm, then make it
+ a single paragraph instead of a nested list. -->
+
+ <p>For each token in the <var title="">id list</var>, run the
+ following steps:</p>
+
+ <ol>
+
+ <li><p>Let <var title="">id</var> be the token.</p></li>
+
+ <li><p>If there is a header cell in the <span
+ title="concept-table">table</span> whose corresponding
+ <code>th</code> element has an ID that is equal to the value of
+ <var title="">id</var>, then assign that header cell to the
+ data cell.</p></li>
+
+ </ol>
+
+ </li>
+
+ </ol>
+
+ </li>
+
</ol>
-
<h3 id="forms">Forms</h3>
<!-- XXX everything in WF2 -->
More information about the Commit-Watchers
mailing list