LibreOffice has long had two separate sets of features pertaining to HTML:
A traditional concept of different HTML implementations, as reflected by the HTML Compatibility options which allow one to export to “Mozilla Firefox”, “Microsoft Internet Explorer” or “LibreOffice Writer”. Up until recently, the menu had a “Netscape” entry instead of “Mozilla Firefox” and even had a “HTML 3.2” entry. OpenOffice 3.4.1 still has these two ancient options.
A more modern approach of exporting to XHTML through the File > Export menu. This exports XHTML 1.1 with MathML. The code is clean, but it has inline CSS and does not export everything (footnotes are not present in the output, for example).
Even worse, this page from the OpenOffice website suggests that the XHTML export filter is actually based on the former Star Writer XML format and only works with ODT because it internally maps SWX to ODT.
How come a new export filter from ODT to XHTML was never fully developed, considering the importance of being able to publish to the Web?
Furthermore, this would mean that the HTML version of the ODF 1.2 standard relies on an export filter that was not even designed to handle ODF? This would be seriously inappropriate. I assume said export filter was indeed used to produce this document, based on information in the head of the page’s source code: there is the comment
<!--This file was converted to xhtml by OpenOffice.org - see http://xml.openoffice.org/odf2xhtml for more info.-->. Following the link in this comment, one finds a page that is more up-to-date than the previously mentioned one. On that page one can read:
Now as a sample filter, it is an optional installation component of OpenOffice.org 3.x, installed together with the ‘XSLT sample filter’ package. Within the Office the filter can be used when choosing the XHTML export from File->Export…
Most fortunately, the article gives the impression that the XSLT filter was indeed updated for ODF. However, it is considered an optional sample.
Why does this situation persist? Why is there no all-encompassing solution to impeccably export ODF 1.2 to XHTML 1.1 with full control over the mapping of elements and attributes? Of course, there is the Writer2XHTML extension, but this seems to be stagnant at the moment and the problem is that this kind of functionality should be available by default, not as part of an extension that most people will never think of looking for.
What do we do? I once read somewhere (don’t remember where) that the LibreOffice project was downplaying the importance of XSLT and was trying to rely on it less and less, just as it is trying to rely less on Java. Will the LibreOffice project then develop full-featured XHTML support in another language? Which one would it be? Why not use XSLT, which is meant for exactly that kind of task?
Could anyone provide any practical insight? What are the solutions in the short and long terms?