From 7424da0f3eb3e471fa36f333a9d41af196f5d03d Mon Sep 17 00:00:00 2001 From: Ian Hickson Date: Tue, 18 Mar 2008 01:43:26 +0000 Subject: [PATCH] [e] (0) Abstract out the and attribute definitions. git-svn-id: http://svn.whatwg.org/webapps@1373 340c8d12-0b0e-0410-8428-c7bf67bfef74 --- index | 153 +++++++++++++++++++++++++++------------------------------ source | 122 ++++++++++++++++++++------------------------- 2 files changed, 125 insertions(+), 150 deletions(-) diff --git a/index b/index index 7d0839c5588..7d02a395ff4 100644 --- a/index +++ b/index @@ -24,7 +24,7 @@

HTML 5

-

Working Draft — 9 March 2008

+

Working Draft — 18 March 2008

You can take part in this work. Join the working group's @@ -761,14 +761,17 @@

  • 3.13.10 The th element -
  • 3.13.11 Processing +
  • 3.13.11 Attributes + common to td and th elements + +
  • 3.13.12 Processing model @@ -1544,7 +1547,7 @@
  • 8.1.2.2. End tags -
  • 8.1.2.3. +
  • 8.1.2.3. Attributes
  • 8.1.2.4. Optional @@ -19907,65 +19910,26 @@ notes on what would need to be defined for dashed lines:
    Element-specific attributes: -
    colspan +
    colspan -
    rowspan +
    rowspan
    DOM interface:
    interface HTMLTableCellElement : HTMLElement {
    -           attribute long colSpan;
    -           attribute long rowSpan;
    -  readonly attribute long cellIndex;
    +     class=idl>interface HTMLTableDataCellElement : HTMLTableCellElement {
     };

    The td element represents a data cell in a table. -

    The td element may have a colspan content attribute - specified, whose value must be a valid non-negative - integer greater than zero. Its default value, which must be used if parsing the - attribute as a non-negative integer returns either an error or zero, - is 1. - -

    The td element may also have a rowspan content - attribute specified, whose value must be a valid - non-negative integer. Its default value, which must be used if parsing the - attribute as a non-negative integer returns an error, is also 1. -

    The td element and its colspan and rowspan attributes + title=attr-tdth-colspan>colspan and rowspan attributes take part in the table model. -

    The colspan DOM - attribute must reflect the content attribute of the - same name, with the exception that on setting, if the new value is 0, then - an INDEX_SIZE_ERR exception must be raised. - -

    The rowspan DOM - attribute must reflect the content attribute of the - same name. - -

    The cellIndex DOM attribute must, if - the element has a parent tr element, return - the index of the cell's element in the parent element's cells collection. If there - is no such parent element, then the attribute must return 0. - -

    There has been some suggestion that the headers attribute from HTML4, or some other mechanism that - is more powerful than scope="", should be included. - This has not yet been considered. -

    3.13.10 The th element

    @@ -19984,9 +19948,9 @@ notes on what would need to be defined for dashed lines:
    Element-specific attributes: -
    colspan +
    colspan -
    rowspan +
    rowspan
    scope @@ -20002,21 +19966,6 @@ notes on what would need to be defined for dashed lines:

    The th element represents a header cell in a table. -

    The th element may have a colspan content - attribute specified, whose value must be a valid - non-negative integer greater than zero. Its default value, which must - be used if parsing the attribute as a non-negative integer returns - either an error or zero, is 1. - -

    The th element may also have a rowspan content - attribute specified, whose value must be a valid - non-negative integer. Its default value, which must be used if parsing the - attribute as a non-negative integer returns an error, is also 1. -

    The th element may have a scope content attribute specified. The scope attribute @@ -20065,8 +20014,8 @@ notes on what would need to be defined for dashed lines: cells and header cells.

    The th element and its colspan, rowspan, and colspan, rowspan, and scope attributes take part in the table model. @@ -20074,14 +20023,56 @@ notes on what would need to be defined for dashed lines: attribute must reflect the content attribute of the same name. -

    The HTMLTableHeaderCellElement - interface inherits from the HTMLTableCellElement interface and - therefore also has the DOM attributes defined above in the td section. +

    3.13.11 Attributes common to + td and th + elements

    + +

    The td and th elements may have a colspan content attribute + specified, whose value must be a valid non-negative + integer greater than zero. Its default value, which must be used if parsing the + attribute as a non-negative integer returns either an error or zero, + is 1. + +

    The td and th elements may also have a rowspan content attribute + specified, whose value must be a valid non-negative + integer. Its default value, which must be used if parsing the attribute as a + non-negative integer returns an error, is also 1. + +

    The td and th elements implement interfaces that inherit from + the HTMLTableCellElement + interface: + +

    interface HTMLTableCellElement : HTMLElement {
    +           attribute long colSpan;
    +           attribute long rowSpan;
    +  readonly attribute long cellIndex;
    +};
    + +

    The colspan + DOM attribute must reflect the content attribute of + the same name, with the exception that on setting, if the new value is 0, + then an INDEX_SIZE_ERR exception must be raised. + +

    The rowspan + DOM attribute must reflect the content attribute of + the same name. + +

    The cellIndex DOM attribute must, + if the element has a parent tr element, + return the index of the cell's element in the parent element's cells collection. If there + is no such parent element, then the attribute must return 0. -

    3.13.11 Processing model

    +

    3.13.12 Processing model

    The various table elements and their content attributes together define the table model. @@ -20184,7 +20175,7 @@ notes on what would need to be defined for dashed lines: represented by table elements and their descendants. Documents must not have table model errors. -

    3.13.11.1. Forming a table
    +
    3.13.12.1. Forming a table

    To determine which elements correspond to which slots in a table associated with a cell anchored to them, then this is a table model error. -

    3.13.11.2. +
    3.13.12.2. Forming relationships between data cells and header cells

    Each data cell can be assigned zero or more header cells. The .

  • Then, the start tag may have a number of attributes, the syntax for which is + href="#attributes2" title=syntax-attributes>syntax for which is described below. Attributes may be separated from each other by one or more space characters.
  • After the attributes, there may be one or more space characters. (Some attributes are - required to be followed by a space. See the attributes section below.)
  • Then, if the element is one of the void elements, then there may be a @@ -37884,9 +37875,9 @@ function receiver(e) { (>) character. -
    8.1.2.3. Attributes
    +
    8.1.2.3. Attributes
    -

    Attributes for an +

    Attributes for an element are expressed inside the element's start tag.

    Attributes have a name and a value. Content model:

    Flow content.
    Element-specific attributes:
    -
    colspan
    -
    rowspan
    +
    colspan
    +
    rowspan
    DOM interface:
    -
    interface HTMLTableCellElement : HTMLElement {
    -           attribute long colSpan;
    -           attribute long rowSpan;
    -  readonly attribute long cellIndex;
    +    
    interface HTMLTableDataCellElement : HTMLTableCellElement {
     };
    @@ -17433,48 +17430,11 @@ notes on what would need to be defined for dashed lines:

    The td element represents a data cell in a table.

    -

    The td element may have a colspan content attribute - specified, whose value must be a valid non-negative - integer greater than zero. Its default value, which must be - used if parsing the attribute as a non-negative integer - returns either an error or zero, is 1.

    - -

    The td element may also have a rowspan content attribute - specified, whose value must be a valid non-negative - integer. Its default value, which must be used if parsing the - attribute as a non-negative integer returns an error, is also - 1.

    -

    The td element and its colspan and rowspan attributes take part in the + title="attr-tdth-colspan">colspan and rowspan attributes take part in the table model.

    -

    The colspan DOM - attribute must reflect the content attribute of the - same name, with the exception that on setting, if the new value is - 0, then an INDEX_SIZE_ERR exception must be raised.

    - -

    The rowspan DOM - attribute must reflect the content attribute of the - same name.

    - -

    The cellIndex - DOM attribute must, if the element has a parent tr - element, return the index of the cell's element in the parent - element's cells collection. If - there is no such parent element, then the attribute must return - 0.

    - -

    There has been some suggestion that the headers attribute from HTML4, or some other - mechanism that is more powerful than scope="", - should be included. This has not yet been considered.

    -

    The th element

    @@ -17486,8 +17446,8 @@ notes on what would need to be defined for dashed lines:
    Content model:
    Phrasing content.
    Element-specific attributes:
    -
    colspan
    -
    rowspan
    +
    colspan
    +
    rowspan
    scope
    DOM interface:
    @@ -17500,22 +17460,6 @@ notes on what would need to be defined for dashed lines:

    The th element represents a header cell in a table.

    -

    The th element may have a colspan content attribute - specified, whose value must be a valid non-negative - integer greater than zero. Its default value, which must be - used if parsing the attribute as a non-negative integer - returns either an error or zero, is 1.

    - -

    The th element may also have a rowspan content attribute - specified, whose value must be a valid non-negative - integer. Its default value, which must be used if parsing the - attribute as a non-negative integer returns an error, is also - 1.

    -

    The th element may have a scope content attribute specified. The scope attribute is @@ -17566,8 +17510,8 @@ notes on what would need to be defined for dashed lines: data cells and header cells.

    The th element and its colspan, rowspan, and colspan, rowspan, and scope attributes take part in the table model.

    @@ -17575,10 +17519,50 @@ notes on what would need to be defined for dashed lines: attribute must reflect the content attribute of the same name.

    -

    The HTMLTableHeaderCellElement interface inherits - from the HTMLTableCellElement interface and therefore - also has the DOM attributes defined above in the td - section.

    + +

    Attributes common to td and th elements

    + +

    The td and th elements may have a colspan content + attribute specified, whose value must be a valid non-negative + integer greater than zero. Its default value, which must be + used if parsing the attribute as a non-negative integer + returns either an error or zero, is 1.

    + +

    The td and th elements may also have a + rowspan content + attribute specified, whose value must be a valid non-negative + integer. Its default value, which must be used if parsing the + attribute as a non-negative integer returns an error, is also + 1.

    + +

    The td and th elements implement + interfaces that inherit from the HTMLTableCellElement + interface:

    + +
    interface HTMLTableCellElement : HTMLElement {
    +           attribute long colSpan;
    +           attribute long rowSpan;
    +  readonly attribute long cellIndex;
    +};
    + +

    The colspan DOM + attribute must reflect the content attribute of the + same name, with the exception that on setting, if the new value is + 0, then an INDEX_SIZE_ERR exception must be raised.

    + +

    The rowspan DOM + attribute must reflect the content attribute of the + same name.

    + +

    The cellIndex + DOM attribute must, if the element has a parent tr + element, return the index of the cell's element in the parent + element's cells collection. If + there is no such parent element, then the attribute must return + 0.

    Processing model