blob: 2ffd585445fa0a9bf6ff3def51de329ce5183b33 [file] [log] [blame]
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>XSL transformation from 'OpenOffice.org XML' to 'XHTML 1.0'</title>
<meta name="generator" content="StarOffice/OpenOffice.org XSLT (http://xml.openoffice.org/sx2ml)" />
<meta name="created" content="2005-11-17T15:11:55" />
<meta name="changedby" content="Svante Schubert" />
<meta name="changed" content="2005-12-21T13:41:22" />
<meta name="subject" content="XSL transformation from 'OpenOffice.org XML' to 'XHTML 1.0'" />
<meta name="keywords" content="xslt xhtml opendocument openoffice.org" />
<base href="." />
</head>
<body>
<link rel="stylesheet" type="text/css" href="../xmloff.css" media="screen" />
<h1>
<a name="XSL_transformation_from__27OpenOffice.org_XML_27_to__27XHTML_1.0_27"></a>XSL transformation from 'OpenOffice.org XML' to 'XHTML 1.0'</h1>
<h2>Contents</h2>
<ul>
<li>
<a href="#Abstract">Abstract</a>
</li>
<li>
<a href="#Use_without_Office__28stand-alone_29">Use without Office (stand-alone)</a>
</li>
<li>
<a href="#Overview_over_XSLT_stylesheets">Overview over XSLT stylesheets</a>
</li>
<li>
<a href="#Add-On_Support_for_Master_Documents__28stand-alone_only_29">Add-On Support for Master Documents (stand-alone only)</a>
</li>
<li>
<a href="#Feedback">Feedback</a>
</li>
</ul>
<h2>
<a name="Abstract"></a>Abstract</h2>
<p>The filter creates <a href="http://www.w3.org/TR/xhtml1/">strict XHTML 1.0</a> from the <a href="http://xml.openoffice.org/general.html">OpenOffice.org XML</a> format, which was the standard XML format of OpenOffice.org 1.x. Since OpenOffice.org 2.0 the default document format changed to the <a href="http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=office">OASIS Open Document Format for Office Applications (OpenDocument)</a>. The filter can only be used with OpenDocument in conjunction with a running Office, compare next section 'Use without Office (stand-alone)'.</p>
<p>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.</p>
<p>Now as a sample filter, it is an optional installation component of OpenOffice.org 1.x/2.x, installed together with the 'XSLT sample filter' package. Within the Office the filter can be used when choosing the XHTML export from File-&gt;Export...</p>
<p>The XHTML transformation is being used for creation of the <a href="http://api.openoffice.org/docs/DevelopersGuide/DevelopersGuide.xhtml">Developers's Guide</a> of the <a href="http://api.openoffice.org/SDK/">OpenOffice.org Software Development Kit (SDK)</a> from OpenOffice.org documents.</p>
<h2>
<a name="Use_without_Office__28stand-alone_29"></a>Use without Office (stand-alone)</h2>
<p>The XHTML export filter can be used without an Office to create XHTML files of OpenOffice.org 1.x documents. The filter will NOT work stand-alone with the new default OpenDocument format, but are still working in OpenOffice.org 2.x as the Office offers the functionality to map internally from OpenDocument to the earlier XML format for XSLT filters (cp. Tools-&gt;XML Filter Settings). <br/>The filter comprises of a set of XSLT 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</p>
<ul>
<li>
<a href="http://xml.apache.org/xalan-j/index.html">Apache Xalan processor</a>
</li>
<li>
<a href="http://www.blnz.com/xt/index.html">XT processor</a>
</li>
<li>or any other XSLT processor supporting the <a href="http://exslt.org/exsl/index.html">http://exslt.org/common</a> node-set function.</li>
</ul>
<p>The <a href="http://xml.apache.org/xalan-j/index.html">Apache Xalan processor</a> is being used in the Office by default. It has been bundled with OpenOffice.org together with the <a href="http://xerces.apache.org/">Xerces XML parser</a>.</p>
<h2>
<a name="Overview_over_XSLT_stylesheets"></a>Overview over XSLT stylesheets </h2>
<p>All stylesheets can be installed by choosing as optional part of the Office installation ('XSLT sample filter'). They are located &lt;OFFICE_PATH&gt;/share/xslt. </p>
<p>To view them online, you may browse the <a href="http://framework.openoffice.org/source/browse/framework/filter/source/xslt/">CVS</a> and choose the 'download' link beyond the latest version of a stylesheet.</p>
<div>
<table border="0" cellspacing="0" cellpadding="0" class="infotable">
<colgroup>
<col width="236"/>
<col width="369"/>
<col width="803"/>
</colgroup>
<thead>
<tr>
<td colspan="3">Overview over XSLT stylesheets</td>
</tr>
<tr>
<th>
Path
</th>
<th>
Document
</th>
<th>
Description
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
common
</td>
<td>
measure_conversion.xsl
</td>
<td>
Measure conversions (e.g. inch to cm) usable for all import and export XSLT filter.
</td>
</tr>
<tr>
<td>
export/common
</td>
<td>
body.xsl
</td>
<td>
Common mapping mechanisms of elements of languages similar to XHTML (WML, other XML for small devices, et alias)
</td>
</tr>
<tr>
<td>
export/common
</td>
<td>
table_of_content.xsl
</td>
<td>
Common mapping mechanisms of tables
</td>
</tr>
<tr>
<td>
export/common/styles
</td>
<td>
style_collector.xsl
</td>
<td>
Common mechanisms to flatening the style hierarchy of the OpenOffice.org styles
</td>
</tr>
<tr>
<td>
export/common/styles
</td>
<td>
style_mapping_css.xsl
</td>
<td>
Common mapping of OpenOffice.org styles to CSS
</td>
</tr>
<tr>
<td>
export/common/styles
</td>
<td>
style_mapping_html32.xsl
</td>
<td>
Common mapping of OpenOffice.org styles to HTML 3.2 (not used any longer, once needed for PALM HTML 3.2 subset)
</td>
</tr>
<tr>
<td>
export/common/table
</td>
<td>
table.xsl
</td>
<td>
Common mechanisms to map OpenOffice.org tables to HTML (once shared by XHTML and PALM HTML)
</td>
</tr>
<tr>
<td>
export/common/table
</td>
<td>
table_cells.xsl
</td>
<td>
Common mechanisms to map OpenOffice.org table cells to HTML (once shared by XHTML and PALM HTML)
</td>
</tr>
<tr>
<td>
export/common/table
</td>
<td>
table_columns.xsl
</td>
<td>
Common mechanisms to map OpenOffice.org table columns to HTML (once shared by XHTML and PALM HTML)
</td>
</tr>
<tr>
<td>
export/common/table
</td>
<td>
table_rows.xsl
</td>
<td>
Common mechanisms to map OpenOffice.org table rows to HTML (once shared by XHTML and PALM HTML)
</td>
</tr>
<tr>
<td>
export/xhtml
</td>
<td>
ooo2xhtml.xsl
</td>
<td>
The starting stylesheet for XHTML transformations
</td>
</tr>
<tr>
<td>
export/xhtml
</td>
<td>
body.xsl
</td>
<td>
Special XHTML mappings of body elements to XHTML
</td>
</tr>
<tr>
<td>
export/xhtml
</td>
<td>
header.xsl
</td>
<td>
Special XHTML mappings of header elements to XHTML
</td>
</tr>
<tr>
<td>
export/xhtml
</td>
<td>
table.xsl
</td>
<td>
Special XHTML mappings of table elements to XHTML
</td>
</tr>
<tr>
<td>
export/xhtml
</td>
<td>
master_chapter_numbering.xsl
</td>
<td>
Special OpenOffice.org Master document mappings (only standalone useable with Java extension s.b.)
</td>
</tr>
<tr>
<td>
export/xhtml
</td>
<td>
master_document.xsl
</td>
<td>
Special OpenOffice.org Master document mappings (only standalone useable with Java extension s.b.)
</td>
</tr>
<tr>
<td>
export/xhtml
</td>
<td>
master_refs_workaround.xsl
</td>
<td>
Special OpenOffice.org Master document mappings (only standalone useable with Java extension s.b.)
</td>
</tr>
<tr>
<td>
export/xhtml
</td>
<td>
master_usability_links.xsl
</td>
<td>
Special OpenOffice.org Master document mappings (only standalone useable with Java extension s.b.)
</td>
</tr>
</tbody>
</table>
</div>
<p></p>
<h2>
<a name="Add-On_Support_for_Master_Documents__28stand-alone_only_29"></a>Add-On Support for Master Documents (stand-alone only)</h2>
<p>Aside of the plain XSLT stylesheets some Java extension has been implemented for the transformation of master documents (sxg) to XHTML. Basically the extension triggers a new XSL transformation for each referenced child document that is linked from a master document.</p>
<p>This enables the following features once necessary for the creation of the Development Guide: </p>
<ul>
<li>If references are being used in a content table the XHTML output references to the created XHTML child documents.</li>
<li>The sequence of numbered chapters of child documents (not aware of their master document by design) are made feasible by parameter for the indent of chapter start of the child document (otherwise all children chapters would start with '1'). </li>
<li>It is no longer necessary to unzip the XML files of the (compressed) OpenOffice.org documents. The Java class replaces, if necessary (dependent on the suffix) the path/input URL with a JAR URL.
</li>
</ul>
<p>This add-on is only useable with XT. The sources are bundled in a <a href="master_document_support.zip">ZIP</a>.</p>
<h2>
<a name="Feedback"></a>Feedback</h2>
<p>Any comment is welcome and should be posted to the XML developer mailing list <a href="mailto:dev@xml.openoffice.org">dev@xml.openoffice.org</a>. For subscription information or archives, see the this project's <a href="http://xml.openoffice.org/servlets/ProjectMailingListList">mailing list section</a>. <br/>
Anyone from community is welcome to join the project. The current issues and enhancements filed for XHTML export are <a href="http://www.openoffice.org/issues/buglist.cgi?issue_status=NEW&issue_status=STARTED;&issue_status=REOPENED;&email1=;&emailtype1=exact;&emailassigned_to1=1;&email2=;&emailtype2=exact;&emailreporter2=1;&issueidtype=include;&issue_id=;&changedin=;&votes=;&chfieldfrom=;&chfieldto=Now;&chfieldvalue=;&short_desc=xhtml;&short_desc_type=substring;&long_desc=;&long_desc_type=substring;&issue_file_loc=;&issue_file_loc_type=substring;&status_whiteboard=;&status_whiteboard_type=substring;&keywords=;&keywords_type=anytokens;&field0-0-0=noop;&type0-0-0=noop;&value0-0-0=;&cmdtype=doit;&newqueryname=;&order=%27Importance%27;&Submit+query=Submit+query">these</a> (more or less as all issues with 'XHTML' in their title are listed) </p>
</body>
</html>