The default behavior of Writer2xhtml is to export content and formatting. Alternatively you can export content only; this can be controlled with a configuration file. The configuration file cleanxhtml.xml
uses some built-in text- and paragraph styles in OpenOffice.org to create well-structured XHTML documents, using most of the semantic tags offered by XHTML.
For your paragraphs, the style Text body is used for ordinary paragraphs: <p>...</p>
.
<address>...</address>
.
The style Quotations is used to produce blockquotes.
Several paragraphs with this style are collected to a single blockquote:
<blockquote><p>...</p><p>...</p></blockquote>
.
The style preformatted text is used to produce <pre>...</pre>
.
The style Horizontal line is used to produce <hr>
.
If you format paragraphs with other styles, they will be exported as ordinary paragraphs (<p>
) with a class attribute. For example this paragraph has style My Own Style, which will be exported as <p class=”MyOwnStyle”>...</p>
.
OpenOffice.org does not support definition lists directly. Instead you can use two paragraph styles:
<dt>...</dt>
.<dd>...</dd>
.Any sequence of these are wrapped in a single <dl>...</dl>
, like this:
A number of text styles maps to XHTML elements as well: Use the text styles Citation – Definition – Emphasis – Example – Source Text
– Strong Emphasis – Teletype – User entry – Variable to produce <cite>
, <dfn>
, <em>
, <samp>
, <code>
, <strong>
, <tt>
, <kbd>
, <var>
.
If you export content only, hard character formatting is ignored in general. An exception to this rule is bold, italics, superscript, subscript and fixed pitch fonts, which are exported to <b>
, <i>
, <sup>
, <sub>
and <tt>
respectively.