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

How should text be normalized for tests?

From: Michael B. Allen <mballen@erols.com>
Date: Mon, 25 Mar 2002 01:02:10 -0500
To: www-dom-ts@w3.org
Message-Id: <20020325010210.714035e5.mballen@erols.com>
Expat returns separate #text fragments for newlines and space. This
results in extra text nodes in my average DOM tree (unless normalize()
is called of-course). I believe this is acceptable but the
nodegetfirstchildnull test assumes that the second node is employeeId:

67       doc = load("staff");
68       elementList = doc.getElementsByTagName("employee");
69       employeeNode = elementList.item(0);
70       employeeList = employeeNode.getChildNodes();
71 --->  secondChildNode = employeeList.item(1);

This is a #text node for me.

-- 
May The Source be with you.
Received on Monday, 25 March 2002 00:56:01 GMT

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