CADbloke / daisydiff

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

If an HTML table has an attribute than the difference text is shown outside

GoogleCodeExporter opened this issue · comments

What steps will reproduce the problem?
1. Create a file a.html as attached (Contains a simple table)
2. Create a file b.html (same table with a word and attribute removed)
3. Run java -jar daisydiff.jar a.html b.html

What is the expected output? What do you see instead?
I expected the same table with the removed word inside a cell. Instead
the word is outside of the table (There are actually two tables now)

What version of the product are you using? On what operating system?
daisydiff 1.0, Windows XP on Java 5

Please provide any additional information below.
My example is really trivial. So unless I am missing something, this 
must be a bug.

Original issue reported on code.google.com by kkape...@gmail.com on 21 Aug 2009 at 2:57

Attachments:

That's indeed a bug. Looks like a regression, but I'm not sure.

Original comment by guy...@gmail.com on 9 Sep 2009 at 2:50

  • Changed state: Accepted
  • Added labels: ****
  • Removed labels: ****
Look at the comment # 2 for issue #11: 
http://code.google.com/p/daisydiff/issues/detail?id=11&can=1#c2

If you re-word this answer to this current example:
The reason for "another" being outside of the table is that:
   "another" never was a part of a table without attribute cellpadding="5",
   so it is not honest to render it inside such a table.

The fix with side effect for the issue 11 though would make your example much 
pretier.
You will retain your table structure, but the removed word will be placed 
outside of 
the table for the reasons above.
The fix for the bug 11 is not in the SVN head, but you could take it from issue 
11 
attachments here:
http://code.google.com/p/daisydiff/issues/detail?id=11&can=1#c4
Also, the side effect is discussed in more details here:
http://groups.google.com/group/daisydiff/browse_thread/thread/21fb89ead6feda01

Attached is a zip of version 1.1.2 with the fixes that were done after the 1.0 
is 
released. Look in the readme.txt in the "Update Notes" for detailed info.
It does contain the issue 11 fix with its side effect.

Original comment by anastass...@businesswire.com on 30 Oct 2009 at 3:34

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

Attachments:

Do you think it's best to commit this to trunk?

Original comment by guy...@gmail.com on 9 Nov 2009 at 2:19

  • Added labels: ****
  • Removed labels: ****
Anastassia can you post also the source for 1.1.2? 

Or it just contains the same files mentioned in Issue 11 (Only changed files 
are 
TextNodeComparator.java, TagNode.java, TableStatics.java)?

Thank you.

Original comment by kkape...@gmail.com on 9 Nov 2009 at 3:57

  • Added labels: ****
  • Removed labels: ****
Kkapelon:
The difference between the source for 1.1.2 and the current trunk head is the 3 
files from the issue 11 attachment.

Those files were not posted in the trunk head because of the side effect 
(reversed 
order of removed content that has to be placed outside of the structure). But 
you do 
have all the source available.

The current trunk head directories marked as the revision 134, however you 
won't 
find a file older than 127 - because revisions 128-134 were on the branch. The 
branch is not a working version atm.

The difference between the source for 1.1.2 and 1.0 is more than the 3 files.
I don't know what revision 1.0 was build on. So I can't tell you.

Guy:
We probably should tag revisions with the corresponding build number if the 
build 
occurs - that way people can find answers on the questions like that.

About whether to commit it to the trunk: for me either way is fine, and it is a 
question what is more important for you and the majority of people:
      the order of differences 
   or the HTML structure of the document.
If you want to make this temporary fix a middle step (because at least it does 
fix 
the invalid HTML output) - let's post it to the trunk. 
If you want to offer people a choice of whether to be a victim of the side 
effect - 
it's better to keep it separate for now as the issue attachment. 

Thank you.

Original comment by anastass...@businesswire.com on 9 Nov 2009 at 4:32

  • Added labels: ****
  • Removed labels: ****
True.

Either way is fine by me aswell, as I'm not using DaisyDiff myself. 
I suggest we keep it out of trunk until we had some decent QA, which I'm unable 
to
do. Please let me know what I can do to facilitate work on this.

Original comment by guy...@gmail.com on 9 Nov 2009 at 4:47

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