Re: How should text be normalized for tests?

>Expat returns separate #text fragments for newlines and space

That doesn't comply with the expectations which the DOM places upon XML
processors. See the description of Text nodes:

   "When a document is first made available via the DOM, there is only one
   Text node for each block of text. Users may create adjacent Text nodes
   that represent the contents of a given element without any intervening
   markup, but should be aware that there is no way to represent the
   separations between these nodes in XML or HTML, so they will not (in
   general) persist between DOM editing sessions. The normalize() method on
   Node merges any such adjacent Text objects into a single node for each
   block of text."

Your choices would seem to be to either (a) accept that Expat is going to
fail compliance tests which are based on the above assertion (which
requires that your test results explain why this isn't a "first made
available" situation), or (b) write your test driver so it calls normalize
() before running the tests (ditto) or (c) fix Expat's DOM builder.

______________________________________
Joe Kesselman  / IBM Research

Received on Monday, 25 March 2002 08:53:20 UTC