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 769343 - ssconvert produces not so great HTML when exporting multiple sheets
ssconvert produces not so great HTML when exporting multiple sheets
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: import/export HTML
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Andreas J. Guelzow
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2016-07-31 05:24 UTC by Richard Heck
Modified: 2016-08-04 20:56 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Richard Heck 2016-07-31 05:24:24 UTC
This is with the html_range exporter. We get HTML of the form:

<p><table>
...
</table>

<p><table>
...
</table>

I.e., the <p> tag is not closed. This causes problems when attempting to include this sort of output in XHTML files. It works perfectly well with just one sheet. In particular, this causes problems when trying to use ssconvert as a converter with LyX when producing XHTML output.
Comment 1 Morten Welinder 2016-07-31 13:30:34 UTC
If you want xhtml output you should use "-E Gnumeric_html:xhtml" and you will
get

<p /><table>
...
</table>

so the <p> is closed in this case.

That said, we should probably close the <p> in the plain html case.
Comment 2 Morten Welinder 2016-07-31 19:44:11 UTC
Andreas, do you have any idea why the "p" handling is as it is?

Other than maybe for really old html I would guess we would want to do
<p><table ...>...</table></p>


	switch (version) {
	case HTML40:
		gsf_output_puts (output, "<p><table cellspacing=\"0\" cellpadding=\"3\">\n");
		break;
	case XHTML:
		gsf_output_puts (output, "<p /><table cellspacing=\"0\" cellpadding=\"3\">\n");
		break;
	default:
		gsf_output_puts (output, "<p><table border=\"1\">\n");
		break;
	}
Comment 3 Andreas J. Guelzow 2016-07-31 20:13:34 UTC
I don't recall why we did it this way, but I see nothing wrong with
<p><table ...>...</table></p>
Comment 4 Richard Heck 2016-08-01 15:00:17 UTC
(In reply to Morten Welinder from comment #1)
> If you want xhtml output you should use "-E Gnumeric_html:xhtml" 

The reason we need to use Gnumeric_html:html40frag is that we want just the table, not a complete document. (We embed the output in a larger document.) Both Gnumeric_html:xhtml and Gnumeric_html:xhtml_range give a complete document (with <html>, <head>, etc).

Thanks for the attention to this.
Comment 5 Andreas J. Guelzow 2016-08-04 03:09:19 UTC
The W3C validator for HTML 4.01 strict does not like:
<p><table ...>...</table></p>
It thinks P is no longer open when it runs into </p>.
That validator also does not like <br>, <br /> or <p /> to separate the tables.

THis pretty much explains why we have the code as it is.
Comment 6 Andreas J. Guelzow 2016-08-04 03:25:15 UTC
This problem has been fixed in the unstable development version. The fix will be available in the next major software release. You may need to upgrade your Linux distribution to obtain that newer version.
Comment 7 Richard Heck 2016-08-04 20:56:38 UTC
Thanks very much.