CADbloke / daisydiff

Automatically exported from code.google.com/p/daisydiff

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

duplication of the content

GoogleCodeExporter opened this issue · comments

What steps will reproduce the problem?
1.Create 2 identic html files
2.Delete some text from the middle of an HTML element, so some text remains
in the element before and after the deleted text 
3.Change some attributes of the HTML element with the deleted text.

What is the expected output? What do you see instead?
Expected: display of all the text with the deleted text highlighted in red 
and crossed out
Instead: some of the remaining text is duplicated.


Please use labels and text to provide additional information.
The problem again lies in the comparison of tags by semantic rather than 
object comparison. 
During the splitting 2 new tags are added to the children collection of 
the parent. Those 2 new tags represent "splitted node" and for that reason 
they have exactly the same name and attributes as the original:

>>>
   TagNode part1 = new TagNode(null, getQName(), getAttributes());
   TagNode part2 = new TagNode(null, getQName(), getAttributes());
<<<

Now we have 3 "equal" HTML tags and the original tag has to be removed. Of 
course first found is the one that is going to be removed. But the tags 
reside in this order: <part before split> <part after split> <original>. 
So instead of the original the <part before split> is removed and now the 
original contains part of the nodes from <part after split>. Those nodes 
are duplicated as the result.

Notice, that the reason for this bug is the same as for the original 
statement in Issue 8.

Original issue reported on code.google.com by anastass...@businesswire.com on 21 Apr 2009 at 8:40

Original comment by anastass...@businesswire.com on 21 Apr 2009 at 10:38

  • Added labels: ****
  • Removed labels: ****

Attachments:

Original comment by anastass...@businesswire.com on 25 Apr 2009 at 12:24

  • Changed state: Fixed
  • Added labels: ****
  • Removed labels: ****