gnu-arch-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnu-arch-users] Re: File-tpye plug-in architecture for Arch?


From: Andrew Suffield
Subject: Re: [Gnu-arch-users] Re: File-tpye plug-in architecture for Arch?
Date: Mon, 22 Dec 2003 15:23:57 +0000
User-agent: Mutt/1.5.4i

On Mon, Dec 22, 2003 at 03:31:59PM +0100, Thomas Zander wrote:
> On Monday 22 December 2003 15:18, Andrew Suffield wrote:
> > The idea was to avoid conflicts in this case:
> >
> > Original:
> > <foo name1="val1" />
> >
> > Modified1:
> > <foo name1="val1" />
> > <foo name2="val2" />
> >
> > Modified2:
> > <foo name1="val1" />
> > <foo name3="val3" />
> >
> > When taking the diff from Original to Modified1, and applying it to
> > Modified2.
> >
> > A generic XML diff tool fails *utterly* to comprehend what to do in
> > this case. It must throw a conflict and fail.
> 
> Could you point out what the expected result would be since I see no 
> difference between this and the plain-text approach of merging.

Well, duh. That's because diff(1) doesn't understand it either. By
pure heuristics it happens to do the right thing more often than not
for source code and english text. It's wrong for almost everything
else.

There's an infinite range of possibilities. A generic XML diff tool
can't comprehend *any* of them.

The right answer depends on the semantics - what the data
*means*. That's what XML doesn't do.

Any or all of the following might be right in some contexts:

<foo name1="val1" />
<foo name2="val2" />

<foo name1="val1" />
<foo name3="val3" />

<foo name1="val1" />
<foo name2="val2" />
<foo name3="val3" />

<foo name1="val1" />
<foo name2="val3" />

<foo name1="val1" />
<foo name3="val2" />

<foo name1="val1" />
<old>
  <foo name3="val3" />
</old>
<new>
  <foo name2="val2" />
</new>

Or an uncountable range of other possibilities.

-- 
  .''`.  ** Debian GNU/Linux ** | Andrew Suffield
 : :' :  http://www.debian.org/ |
 `. `'                          |
   `-             -><-          |

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]