Posted on 2006-03-06 16:24:56-08 by atti
Should be an update instad of a delete + insert?

When i run the diff between the following xml files.

<a>
<b>blah blah blah</b>
<b>blah blah blah</b>
</a>

<a>
<b>blah blah brah</b>
<b>blah blah blah</b>
</a>


I receive the following diffgram (delete/insert):

<?xml version="1.0"?>
<xvcs:diffgram xmlns:xvcs="http://www.xvcs.org/">
<xvcs:delete id="2" first-child-of="/a">
<b>blah blah brah</b>
</xvcs:delete>
<xvcs:insert id="6" follows="/a/b">
<b>blah blah blah</b>
</xvcs:insert>
</xvcs:diffgram>


When i run the diff between the following xml files.

<a>
<b>blah blah blah</b>
</a>

<a>
<b>blah blah brah</b>
</a>


I receive the following diffgram (update):

<?xml version="1.0"?>
<xvcs:diffgram xmlns:xvcs="http://www.xvcs.org/">
<xvcs:update id="1" first-child-of="/a/b">
<xvcs:old-value>blah blah brah</xvcs:old-value>
<xvcs:new-value>blah blah blah</xvcs:new-value>
</xvcs:update>
</xvcs:diffgram>

Why wont I get a update the first run?

Regards Mattias
Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.