W3C home > Mailing lists > Public > www-dom-ts@w3.org > February 2004

error in dom1 hc_normalize2

From: Boudewijn Dekker <b.dekker@ellipsis.nl>
Date: Wed, 4 Feb 2004 14:21:56 +0100
To: <www-dom-ts@w3.org>
Message-ID: <KAEDIDGICPJIIAODNLPNAEJJCCAA.b.dekker@ellipsis.nl>


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(); )


Boudewijn Dekker
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);
      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

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:34:06 UTC