XSL Transformation from ODF to XHTML
Contents
Use without Office (stand-alone)
Overview over XSLT stylesheets
Abstract
The filter creates XHTML 1.1 plus Math 2.0 from the OASIS Open Document Format for Office Applications (OpenDocument). The filter can only be used to transform OpenDocument with or without a running Office, cp. 'Use without Office (stand-alone).
The XHTML export filter has matured since it's beginning early 2000, were it was first part of a commercial product named StarPortal/Webtop. In conjunction with OpenOffice.org the stylesheets had been open-sourced.
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...
Use without Office (stand-alone)
The filter comprises of a set of XSLT 1.0 stylesheets and will work in combination of many XML parser and XSLT stylesheet processor. Unfortunately not all, as the filter although based on the XSLT 1.0 standard, takes advantage of the non-standarized 'node-set' function. Therefore it is necessary to choose one of the following XSLT stylesheet processors
or any other XSLT processor supporting the http://exslt.org/common node-set function.
The Saxon processor is bundled since OpenOffice.org 3.0 and used by default. As the Java base-line since OOo 3 is Java 5 0 no further XML parser is necessary.
Overview over XSLT stylesheets
All stylesheets can be installed by choosing as optional part of the Office installation ('XSLT sample filter'). In a OOo 3.0 the files are located at <OFFICE_PATH>/OpenOffice.org/Basis 3.0/share/xslt.
To view them online, you may browse the CVS and choose the 'download' link beyond the latest version of a stylesheet.
Path | Document | Description |
common | measure_conversion.xsl | Measure conversions (e.g. inch to cm) usable for all import and export XSLT filter. |
odf2xhtml/export/common | body.xsl | Common mapping mechanisms of elements of languages similar to XHTML (WML, other XML for small devices, et alias) |
odf2xhtml/export/common | table_of_content.xsl | Common mapping mechanisms of tables |
odf2xhtml/export/common/styles | style_collector.xsl | Common mechanisms to flatening the style hierarchy of the ODF styles |
odf2xhtml/export/common/styles | style_mapping_css.xsl | Common mapping of ODF styles to CSS |
odf2xhtml/export/common/table | table.xsl | Common mechanisms to map ODF tables to HTML (once shared by HTML3.2 and PALM HTML) |
odf2xhtml/export/common/table | table_cells.xsl | Common mechanisms to map ODF table cells to HTML (once shared by HTML3.2 and PALM HTML) |
odf2xhtml/export/common/table | table_columns.xsl | Common mechanisms to map ODF table columns to HTML (once shared by HTML3.2 and PALM HTML) |
odf2xhtml/export/common/table | table_rows.xsl | Common mechanisms to map ODF table rows to HTML (once shared by HTML3.2 and PALM HTML) |
odf2xhtml/export/xhtml | odf2xhtml.xsl | The starting stylesheet for XHTML transformations |
odf2xhtml/export/xhtml | body.xsl | Special XHTML mappings of body elements to XHTML |
odf2xhtml/export/xhtml | header.xsl | Special XHTML mappings of header elements to XHTML |
odf2xhtml/export/xhtml | table.xsl | Special XHTML mappings of table elements to XHTML |
Feedback
Any comment is welcome and should be posted to the XML developer mailing list dev@xml.openoffice.org. For subscription information or archives, see the this project's mailing list section.