error in dom1 hc_normalize2

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: b.dekker@ellipsis.nl
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);

   }

Received on Wednesday, 4 February 2004 08:19:22 UTC