GNOME Bugzilla – Bug 141266
xmllint produce badly formatted output
Last modified: 2009-08-15 18:40:50 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>
I have the same problem. It started with libxml 2.6.8. Version 2.6.7 works fine.
Created attachment 27245 [details] [review] Proposed patch This patch works for me.
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
This should be closed in libxml2-2.6.11, thanks, Daniel