Comment 4 for bug 179643

Revision history for this message
Tom Rowlands (tom-rowlands) wrote :

What appears to be the same bug is triggered even with very simple input. No difference is detected between:

<testfile/>

and

<testfile>
</testfile>

Faulty behaviour, possibly the same bug, is triggered whenever there is more than one element in the file, not including the XML declaration. (That comment is for clarity; formally the declaration may not be considered an element.) Consequently, the following is also considered the same as both the above by the broken xmldiff:

<?xml version="1.0" encoding="UTF-8"?>
<testfile>
</testfile>

However, the xmldiff is used to compare:

<t><q/></t>

with

<t><q></q></t>

it returns that the files are logically different and that the following is the difference:

<?xml version="1.0"?>
<xupdate:modifications xmlns:xupdate="http://www.xmldb.org/xupdate" version="1.0">
  <xupdate:append select="/" child="first()">
    <xupdate:element name="t"> </xupdate:element>
  </xupdate:append>
  <xupdate:remove select="/t[2]/q[1]"/>
  <xupdate:append select="/t[1]">
    <xupdate:element name="q"> </xupdate:element>
  </xupdate:append>
  <xupdate:remove select="/t[2]"/>
</xupdate:modifications>