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 126697 - html output generate unexpected new lines
html output generate unexpected new lines
Status: RESOLVED OBSOLETE
Product: libxml2
Classification: Platform
Component: htmlparser
2.6.3
Other All
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2003-11-11 07:51 UTC by Roumen Petrov
Modified: 2021-07-05 13:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
test case. more about test case follow: (1.65 KB, application/x-gzip)
2003-11-11 07:54 UTC, Roumen Petrov
Details
test case without ident="yes" (1.60 KB, application/x-gzip)
2003-12-12 16:41 UTC, Roumen Petrov
Details

Description Roumen Petrov 2003-11-11 07:51:29 UTC
Bug with #125093 describe the problem, but only for P tag.
Following test case will show that this is general problem.

When we have text after/before a tag, after xsl transformation document has
new line before/after this tag.

Bug is with severity critical, because when we have br tag after/before li
tag output is without closing /li tag. When this problem is solved severity
can be reduced to enhancement.
Comment 1 Roumen Petrov 2003-11-11 07:54:16 UTC
Created attachment 21352 [details]
test case. more about test case follow:
Comment 2 Roumen Petrov 2003-11-11 08:02:43 UTC
files:
- input.xml : input xml document - used for tests
- test.xslt : trivial transformation - cause for problem
- xml.xslt : trivial transformation - no problem
- test-ok.xslt : extract from my transformations which work arounds
for some html tags used in my documents.
- tast-all.xslt : extended transformation - might can solve problem at
all.

make command always will create two files:
- wrong.html : result after test.xslt. Take note for missing /li tag
- fine.html : result after test-ok.xslt

Comment 3 Daniel Veillard 2003-12-09 17:10:17 UTC
You use xsl:output indent="yes" support. There can't be *ANY*
garantee about the result for formatting blank nodes.
If you want control over the blank space do *NOT* use indent="yes" !

Daniel
Comment 4 Roumen Petrov 2003-12-10 16:29:54 UTC
Which libxml2 version ? 
Bug does not depend of indent="yes" for 2.4.X. With or without indent="yes" 
probles exist. 
For 2.6.x I will check later. 
Comment 5 Daniel Veillard 2003-12-10 16:35:02 UTC
well the stylesheets in the test case had indent="yes"
W.r.t. bug fixes, I never backport, so the probability to get
2.4.X fixes are zero (unless you're ready to give a lot of money
to Red Hat for custom work !)

Daniel
Comment 6 Roumen Petrov 2003-12-12 16:41:18 UTC
Created attachment 22377 [details]
test case without ident="yes"
Comment 7 Roumen Petrov 2003-12-12 17:00:32 UTC
Transformation without ident="yes" is not solution. 
Test case with id=22377 show that problem exist on latest stable releases. 
Output of "test.xslt" is in file "wrong.html". 
Work around for the problem is transformation in "test-all.xslt" with result in 
"fine.html", i.e.: 
- /li tag exist 
- no unexpected (extra) new lines 
========================================================== 
$ xsltproc --version 
Using libxml 20603, libxslt 10101 and libexslt 801 
xsltproc was compiled against libxml 20603, libxslt 10101 and libexslt 801 
libxslt 10101 was compiled against libxml 20603 
libexslt 801 was compiled against libxml 20603 
========================================================== 
About backport :-) ... it is not necessary. I know that problem exist in 2.4.x and I 
can test immediately. Test for 2.6.x i can perform in different environment. 
 
I would like to help with patch :-), not to complain :-(, but I don't have enought time 
:-((((((((( 
 
 
Comment 8 GNOME Infrastructure Team 2021-07-05 13:27:21 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/libxml2/-/issues/

Thank you for your understanding and your help.