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

Bug#269349: marked as done (python2.3-xmldiff: xupdate output contains unneeded statements)



Your message dated Mon, 2 Sep 2019 23:26:41 -0400
with message-id <CAB4XWXxVwipj_O27ADQOsQKHR5NrQm7irX+pWfU_eBCfYQrnPw@mail.gmail.com>
and subject line Removal of xupdate from xmldiff
has caused the Debian Bug report #269349,
regarding python2.3-xmldiff: xupdate output contains unneeded statements
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.)


-- 
269349: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=269349
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: python2.3-xmldiff
Version: 0.6.4-5
Severity: normal
Tags: upstream

Consider the following two files:
a.xml:
<?xml version="1.0"?>
<a>
  <b>
    <c>1</c>
  </b>
  <d>filler</d>
</a>

b.xml:
<?xml version="1.0"?>
<a>
  <b>1</b>
  <d>filler</d>
</a>

Using xmldiff without options gives following solution:
[rename, /a[1]/b[1]/c[1], b]
[move-first, /a[1]/b[1]/b[1], /a[1]]
[remove, /a[1]/b[2]]

but using "xmldiff -x" gives:
<xupdate:rename select="/a[1]/b[1]/c[1]" >
	b
</xupdate:rename>
<xupdate:remove select="/a[1]/b[1]/b[1]" />
<xupdate:append select="/a[1]" >
	<xupdate:element name="b">
		1
	</xupdate:element>
</xupdate:append>
<xupdate:remove select="/a[1]/b[2]" />

Well, there is not much sense in renaming a node, just to delete it
afterwards, insert it anew at a different location and then delete the
parent...
<xupdate:remove select="/a[1]/b[1]" />
and then the append statement would have been the same.

xupdate does allow for moves, by using variables.
A smarter mapping of above behaviour to xupdate would have been:

<xupdate:rename select="/a[1]/b[1]/c[1]">b</xupdate:rename>
<xupdate:variable name="m0" select="/a[1]/b[1]/b[1]" />
<xupdate:append select="/a[1]">
  <xupdate:value-of select="$m0" />
</xupdate:append>
<xupdate:remove select="/a[1]/b[1]" />

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.8.1+sws+acpi
Locale: LANG=de_DE.UTF-8@euro, LC_CTYPE=de_DE.UTF-8@euro

Versions of packages python2.3-xmldiff depends on:
ii  python2.3                    2.3.4-11sid An interactive high-level object-o
ii  python2.3-xml                0.8.3-5     XML tools for Python (2.3.x)
ii  xmldiff-sgml                 0.6.4-5     xmldiff's DTDS and catalogs.

-- no debconf information


--- End Message ---
--- Begin Message ---
xupdate has been removed from xmldiff 2.3, recently uploaded to
Debian; closing this report

-- 
Sandro "morph" Tosi
My website: http://sandrotosi.me/
Me at Debian: http://wiki.debian.org/SandroTosi
G+: https://plus.google.com/u/0/+SandroTosi

--- End Message ---

Reply to: