[WEB4LIB] converting HTML to XHTML

Thomas Dowling tdowling at ohiolink.edu
Mon Apr 2 07:46:52 EDT 2001


> Our library recently exported an Excel table to HTML and posted it to
our
> Web site.  The table is a huge document and contains a ton of HTML
coding,
> which, unfortunately, results in lengthy downloading time.  To speed up
> downloading time, we need to decrease the amount of HTML coding the
table
> contains.  One idea was to convert the HTML coding to XHTML.  Thus, many
of
> the table tags would be eliminated and replaced by style sheet
instructions.
>   Is there a program that can convert HTML to XHTML?  If so, would it
> replace HTML coding (for tables) into style sheet instructions?  Thanks.
>

Someone is misleading you about what XHTML is.  It is neither more nor
less than a rewritting of HTML 4.01 from SGML to XML.  It adds no new
functionality and cannot magically make a huge table fast to load.  It
*is* possible to rewrite many pages that use tables for layout, using
carefully constructed stylesheets.  That is not related to using XHTML,
and it isn't intended to replace pages with actual tabular data.


>From your several posts about this table, let me make the following
recommendations:

Don't rely on Excel, or any Office application, to generate HTML for you.
Or at least, if you do so, be prepared for a lot of manual clean-up.  For
Excel tables, consider exporting them to a comma- or tab-delimited file
and then using a good text editor.

Spreadsheets aren't web pages and vice versa; unless absolutely necessary,
don't put very long tables into HTML.  Thanks to the continued brain-dead
table rendering in current browsers, none of the major browsers is capable
of showing any part of a table until it downloads and calculates the
layout for the entire table.  You'll usually be better off using multiple
tables or multiple pages, or both.

If users need to interact with your table--for instance, by sorting on
different columns--static HTML cannot help.  You will need some
server-side script to handle that (unless a JavaScript wizard can help
out, but that opens up other difficulties).


Finally, you'll get more concrete answers to your questions if you post
the URL for the page.


Thomas Dowling
OhioLINK - Ohio Library and Information Network
tdowling at ohiolink.edu



More information about the Web4lib mailing list