error in dom1 hc_normalize2

"Boudewijn Dekker" <[email protected]> Wed, 4 Feb 2004 14:21:56 +0100
Newsgroups gmane.comp.web.dom.test-suites.general
Message-ID <[email protected]>
Hi,

We are very happy to use the DOM Test Suite for the development of our xml
database, thanks for all your work, however the following test seems to have
an error: after normalization the child nodes of the attribute should be
tested, not the child nodes of the element node. The wrong line is:
<firstChild interface="Node" obj="element" var="firstChild"/> ( firstChild =
element.getFirstChild(); )
It should be replaced with:
<firstChild interface="Node" obj="attrNode" var="firstChild"/> ( firstChild
= attrNode.getFirstChild(); )

Regards,

Boudewijn Dekker
Ellipsis
Blasiusstraat 124-hs
1091 CZ Amsterdam
e-mail: [email protected]
site: http://www.ellipsis.nl/
tel. +31-20-46 346 42
fax +31-20-46 346 37

orginal generated java source:

public void runTest() throws Throwable {
      Document doc;
      Element root;
      NodeList elementList;
      Element element;
      Node firstChild;
      Node secondChild;
      String childValue;
      Text emptyText;
      Attr attrNode;
      Node retval;
      doc = (Document) load("hc_staff", true);
      root = doc.getDocumentElement();
      emptyText = doc.createTextNode("");
      elementList = root.getElementsByTagName("acronym");
      element = (Element) elementList.item(0);
      attrNode = element.getAttributeNode("title");
      retval = attrNode.appendChild(emptyText);
      element.normalize();
      firstChild = element.getFirstChild();
      childValue = firstChild.getNodeValue();
      assertEquals("firstChild", "Yes", childValue);
      secondChild = firstChild.getNextSibling();
      assertNull("secondChildNull", secondChild);

   }