- From: David Dailey <david.dailey@sru.edu>
- Date: Tue, 17 Apr 2007 11:45:26 -0400
- To: Dão Gottwald <dao@design-noir.de>, Ian Hickson <ian@hixie.ch>
- Cc: public-html@w3.org
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. Does this mean those browsers are doing it wrong? I rather suspect I'm misreading the specs (this is a far simpler explanation). But it did rather break a script which assumed the <table> remained topologically equivalent to the one I had built -- 'til I figured out that the browsers invented this tag for me (despite my preference to the contrary). David Dailey http://srufaculty.sru.edu/david.dailey/ The first time I discovered this I thought it was an IE thing, and I was tempted to fuss, since I had not given anyone to make unlicensed derivative artwork out of my purely expressive original expressions -- (just kidding).
Received on Tuesday, 17 April 2007 15:45:31 UTC