You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Elena Litani <hl...@jtcsv.com> on 2000/10/27 00:56:13 UTC

Patch for RangeImpl.toString()

Hi,
While testing RangeImpl insertNode() I found one more bug in toString()
function, which is supposed to produce a range as a String.
Hmm .. it does not really do it.

Here is example of a DOM tree:

<body>abcd</body>

range is: 
fStartContainer="abcd"
fStartOffset=1
fEndContainer="abcd"
fEndOffset=3

Try to insert text node "123" and use range.toString().
You would expect to see: 123bc
However, you see: 123bcdbc

If you try to run smth more complicated like using fragmentDocument to
insert .. it does not work. Sometimes it even outputs empty range,
although text nodes are present in the range.

The patch to fix this problem is attached.