After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 141266 - xmllint produce badly formatted output
xmllint produce badly formatted output
Status: VERIFIED FIXED
Product: libxml2
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2004-04-28 05:50 UTC by Mike Hommey
Modified: 2009-08-15 18:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (621 bytes, patch)
2004-04-30 22:26 UTC, Nick Wellnhofer
none Details | Review

Description Mike Hommey 2004-04-28 05:50:29 UTC
This is a bug report I got on the Debian BTS. ( http://bugs.debian.org/246181 )

The following small XML file (not valid to save space) produces badly
formatted output when run through "xmllint --format": There is a line break in
front of the "</abbr>". It used to work fine until about a month ago, and at
the same time setting "indent=yes" in an XSLT stylesheet started showing a
similar problem when run though xsltproc. Therefore I think it is an error in
libxml2.

If you remove the DOCTYPE declaration, the output is fine. Maybe this helps in
tracking the error. (Yes, it also happens if the file is actually valid.)

<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
  <body>
    <h1><abbr>a</abbr> b</h1>
  </body>
</html>
Comment 1 Nick Wellnhofer 2004-04-30 21:34:02 UTC
I have the same problem. It started with libxml 2.6.8. Version 2.6.7 works fine.
Comment 2 Nick Wellnhofer 2004-04-30 22:26:25 UTC
Created attachment 27245 [details] [review]
Proposed patch

This patch works for me.
Comment 3 Daniel Veillard 2004-05-09 23:48:29 UTC
Okay, the patches makes sense, it really fix a bug introduced when
creating the xmlsave module, applied and I added the test to the
regression suite, this is now in CVS.

  thanks a lot,

Daniel
Comment 4 Daniel Veillard 2004-07-06 08:58:54 UTC
This should be closed in libxml2-2.6.11,
                                                                                
  thanks,
                                                                                
Daniel