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

Bug#882582: marked as done (xmldiff: wrong result on small change - xmldiff removes text node)



Your message dated Mon, 2 Sep 2019 23:24:49 -0400
with message-id <CAB4XWXwELoL3gFQGqD3c2Cr49FYW+Utk6AY7h7d-02zv9vh+9g@mail.gmail.com>
and subject line Re: xmldiff: wrong result on small change - xmldiff removes text node
has caused the Debian Bug report #882582,
regarding xmldiff: wrong result on small change - xmldiff removes text node
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
882582: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=882582
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: xmldiff
Version: 0.6.10-2+b1
Severity: important

Dear Maintainer,

Given the following small example, xmldiff removes text nodes (new: /section[1]/para[1]/#text()[2]).

Old XML:
--------
<?xml version="1.0" encoding="utf-8"?>
<section xmlns="http://docbook.org/ns/docbook"; version="5.0" xml:lang="en">
  <title>/section[1]/title[1]/#text()[1]</title>
  <para>/section[1]/para[1]/#text()[1]</para>
  <para>/section[1]/para[2]/#text()[1]</para>
</section>

New XML:
--------
<?xml version="1.0" encoding="utf-8"?>
<section xmlns="http://docbook.org/ns/docbook"; version="5.0" xml:lang="en">
  <title>/section[1]/title[1]/#text()[1]</title>
  <para>/section[1]/para[1]/#text()[1]
    <emphasis>/section[1]/para[1]/emphasis[1]/#text()[1]</emphasis>
    /section[1]/para[1]/#text()[2]
  </para>
</section>

Xmldiff yields the following xupdate:
------------------------------------
<?xml version="1.0"?>
<xupdate:modifications xmlns:xupdate="http://www.xmldb.org/xupdate"; xmlns="http://docbook.org/ns/docbook"; version="1.0">
	<xupdate:insert-after select="/section[1]/title[1]">
		<xupdate:element name="para">/section[1]/para[1]/#text()[2]</xupdate:element>
	</xupdate:insert-after>
	<xupdate:update select="/section[1]/para[2]/text()[1]">/section[1]/para[1]/#text()[1]</xupdate:update>
	<xupdate:rename select="/section[1]/para[3]">emphasis</xupdate:rename>
	<xupdate:remove select="/section[1]/emphasis[1]"/>
	<xupdate:insert-after select="/section[1]/para[1]/text()[1]">
		<xupdate:element name="emphasis">/section[1]/para[1]/emphasis[1]/#text()[1]</xupdate:element>
	</xupdate:insert-after>
	<xupdate:update select="/section[1]/para[1]/emphasis[1]/text()[1]">/section[1]/para[1]/emphasis[1]/#text()[1]</xupdate:update>
	<xupdate:remove select="/section[1]/para[2]"/>
</xupdate:modifications>

Expected output
---------------
After applying all modifications, the expected output should be identical to the document given under "New XML".

Observed output
---------------
The ouput produced lacks the second text node in the first paragraph.

The only workaround I have found so far is to initially wrap the first text node in "New XML" (/section[1]/para[1]/#text()[1])
with a fake element. This might work for this case. However, not sure if this has other negative implications otherwise.

Any help or insight is highly appreciated.

Thank you,
Frank

-- System Information:
Debian Release: 8.9
  APT prefers oldstable-updates
  APT policy: (500, 'oldstable-updates'), (500, 'oldstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.49-moby (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash
Init: unable to detect

Versions of packages xmldiff depends on:
ii  libc6           2.19-18+deb8u10
ii  python          2.7.9-1
ii  python-support  1.0.15

xmldiff recommends no packages.

Versions of packages xmldiff suggests:
pn  python-psyco    <none>
ii  xmldiff-xmlrev  0.6.10-2

-- no debconf information

--- End Message ---
--- Begin Message ---
> Xmldiff yields the following xupdate:


xupdate option has been removed from 2.3, recently uploaded to Debian;
closing this report

--- End Message ---

Reply to: