Package: xmlstarlet
Version: 1.1.0-1
Severity: important

Affects: src:fusionforge

Hi,

I’ve found two regressions in xmlstarlet val. Let me show:

SID $ xmlstarlet val -d /usr/share/xml/xhtml/schema/dtd/1.0/xhtml1-strict.dtd 
xinvalid.htm
xinvalid.htm - invalid
LENNY # xmlstarlet val -d /usr/share/xml/xhtml/schema/dtd/1.0/xhtml1-strict.dtd 
xinvalid.htm
xinvalid.htm:7: parser error : Opening and ending tag mismatch: p line 7 and div
<p>&nbsp;</div>
               ^
xinvalid.htm - invalid

Errorlevel is set to 1 correctly in both cases, but the
diagnostics (which I’m using in FusionForge) are missing.

I found out that there’s a ‘-e’ option which is supposed
to show errors.

1|SID $ xmlstarlet val -e -d 
/usr/share/xml/xhtml/schema/dtd/1.0/xhtml1-strict.dtd xinvalid.htm
xinvalid.htm:7: Entity 'nbsp' not defined
xinvalid.htm:7: Opening and ending tag mismatch: p line 7 and div
xinvalid.htm - invalid
1|LENNY # xmlstarlet val -e -d 
/usr/share/xml/xhtml/schema/dtd/1.0/xhtml1-strict.dtd xinvalid.htm
xinvalid.htm:7: parser error : Opening and ending tag mismatch: p line 7 and div
<p>&nbsp;</div>
               ^
xinvalid.htm - invalid

It’s still not as verbose as I would have liked. But what’s that?
Now let’s try with a valid XML file:

1|SID $ xmlstarlet val -d /usr/share/xml/xhtml/schema/dtd/1.0/xhtml1-strict.dtd 
xvalid.htm
xvalid.htm - valid
SID $ xmlstarlet val -e -d 
/usr/share/xml/xhtml/schema/dtd/1.0/xhtml1-strict.dtd xvalid.htm
xvalid.htm:7: Entity 'nbsp' not defined
xvalid.htm - valid
SID $ dpkg -l xmlstarlet
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                  Version               Description
+++-=====================-=====================-==========================================================
ii  xmlstarlet            1.1.0-1               command line XML toolkit

The errorlevel is correctly set to 0, but the nbsp problem is still
there. For the record, I could *not* get the sid version of xmlstarlet
to accept the entity, not even when embedding them (all three from
/usr/share/xml/entities/xhtml/) into the DTD.

1|LENNY # xmlstarlet val -d 
/usr/share/xml/xhtml/schema/dtd/1.0/xhtml1-strict.dtd xvalid.htm
xvalid.htm - valid
LENNY # xmlstarlet val -e -d 
/usr/share/xml/xhtml/schema/dtd/1.0/xhtml1-strict.dtd xvalid.htm
xvalid.htm - valid
LENNY # dpkg -l xmlstarlet
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name                  Version               Description
+++-=====================-=====================-==========================================================
ii  xmlstarlet            1.0.1-2               command line XML toolkit

This version has not the same problem. I consider this a serious
regression in the usability of xmlstarlet as an in-band XML/HTML
validator. The entity problem is even worse in the case of actually
broken files, when you have to scroll over several hundred of them
to get to the error message. (Personally I’m against &nbsp; but I
have to deal with legacy codebase.)


-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.38-2-686 (SMP w/1 CPU core)
Locale: LANG=C, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/mksh

Versions of packages xmlstarlet depends on:
ii  libc6                    2.13-4          Embedded GNU C Library: Shared lib
ii  libxml2                  2.7.8.dfsg-2+b1 GNOME XML library
ii  libxslt1.1               1.1.26-7+b1     XSLT 1.0 processing library - runt

xmlstarlet recommends no packages.

xmlstarlet suggests no packages.

-- no debconf information
Title: blub

 

Title: blub