W3C home > Mailing lists > Public > www-dom-ts@w3.org > September 2002

Patch: HTMLTableElement31.xml tried to add <table> to <table>

From: David Faure <david@mandrakesoft.com>
Date: Thu, 26 Sep 2002 00:57:43 +0200 (CEST)
To: <www-dom-ts@w3.org>
Message-ID: <Pine.LNX.4.33L2.0209260048310.3564-100000@smtp.mandrakesoft.com>

HTMLTableElement31 says it will create a new table and append it to the
document. However it instead creates a table and tries to insert it into
another (empty) table. This is apparently forbidden, per the DOM/HTML
spec.

This isn't what the test says it will do, so I think it's a bug in the
test. What about this fix for it?

Index: HTMLTableElement31.xml
===================================================================
RCS file: /sources/public/2001/DOM-Test-Suite/tests/level2/html/HTMLTableElement31.xml,v
retrieving revision 1.4
diff -u -p -r1.4 HTMLTableElement31.xml
--- HTMLTableElement31.xml      2002/08/22 04:53:15     1.4
+++ HTMLTableElement31.xml      2002/09/25 22:53:01
@@ -59,7 +59,7 @@ See W3C License http://www.w3.org/Consor
 <childNodes obj="testNode" var="tableList"/>
 -->
 <createElement obj="doc" var="table" tagName='"table"'/>
-<appendChild obj="testNode" newChild="table" var="tableNode"/>
+<appendChild obj="testNode.parentNode" newChild="table" var="tableNode"/>
 <getElementsByTagName interface="Document" obj="doc" var="nodeList" tagname='"table"'/>
 <assertSize collection="nodeList" size="2" id="tableSize2"/>
 <tBodies interface="HTMLTableElement" obj="tableNode" var="tbodiesnodeList"/>

This adds the new table as a (last) sibling to the existing empty table,
i.e. to a node where we know tables are allowed - and it makes the test
work for me.

David.
Received on Wednesday, 25 September 2002 18:56:51 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 6 April 2009 12:58:47 GMT