W3C home > Mailing lists > Public > public-html@w3.org > April 2007

Re: Formal definition of HTML5 (was Re: Version information)

From: Do Gottwald <dao@design-noir.de>
Date: Tue, 17 Apr 2007 18:38:18 +0200
Message-ID: <4624F7FA.2050106@design-noir.de>
To: David Dailey <david.dailey@sru.edu>
CC: Ian Hickson <ian@hixie.ch>, public-html@w3.org

David Dailey schrieb:
> 
> At 04:19 AM 4/17/2007, Dão Gottwald wrote:
> 
>> Ian Hickson schrieb:
>>> On Tue, 17 Apr 2007, D�o Gottwald wrote:
>>>> Ian Hickson schrieb:
>>>>>    TBODY can be omitted as a child of TABLE
>>>>>    TR can be a child of TABLE
>>>> How would that affect the DOM1 tBodies and rows collections?
>>> This is defined here:
>>>    http://www.whatwg.org/specs/web-apps/current-work/#tbodies
>>>    http://www.whatwg.org/specs/web-apps/current-work/#rows
>>> ...or in the shorter multipage version (these URIs are not stable):
>>>
>>> http://www.whatwg.org/specs/web-apps/current-work/multipage/section-tabular.html#tbodies 
>>>
>>>
>>> http://www.whatwg.org/specs/web-apps/current-work/multipage/section-tabular.html#rows 
>>>
>>> Let me know if this doesn't address your question.
>>
>> I thought this would break scripts where the author assumed that tbody 
>> is implicitly created, but apparently that assumption is already false 
>> today. So the spec is accurate; nothing to worry about ...
> 
> Let me see if I understand...
> 
> the (whatwg) spec says "Zero or more 
> <http://www.whatwg.org/specs/web-apps/current-work/#tbody>tbody 
> elements, or [...]"
> 
> The W3C spec says
> "The <http://www.w3.org/TR/html401/struct/tables.html#edef-TBODY>TBODY 
> start tag is always required except when the table contains only one 
> table body and no table head or foot sections. The 
> <http://www.w3.org/TR/html401/struct/tables.html#edef-TBODY>TBODY end 
> tag may always be safely omitted."
> 
> But when I look at document.getElementById(tableId).firstChild in Opera, 
> FF, or IE it is always a <tbody> , even if I did not code one there 
> myself. The browser inserts if for me.

Hmm, that's what I thought too. What I tried then in Firefox (Gecko 
1.9a4pre) is <table><thead>...</thead><tr>...</tr></table>, and tbody 
_wasn't_ created in that case. Now if tbody is created in the 
<table><tr>...</tr></table> case, that seems completely orthogonal to 
the HTML4.01 spec and also incompatible with the WHATWG draft.

--Dao
Received on Tuesday, 17 April 2007 16:38:45 UTC

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:38:42 UTC