<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE abiword PUBLIC "-//ABISOURCE//DTD AWML 1.0 Strict//EN" "http://www.abisource.com/awml.dtd">
<abiword template="false" version="2.0.0" xmlns:svg="http://www.w3.org/2000/svg" xmlns:dc="http://purl.org/dc/elements/1.1/" fileformat="1.1" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:awml="http://www.abisource.com/awml.dtd" xmlns="http://www.abisource.com/awml.dtd" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" props="dom-dir:ltr; document-footnote-restart-section:1; document-endnote-type:numeric; document-endnote-place-enddoc:1; document-endnote-initial:1; lang:yi-US; document-endnote-restart-section:1; document-footnote-restart-page:1; document-footnote-type:numeric; document-footnote-initial:1; document-endnote-place-endsection:1">
<!-- ======================================================================== -->
<!-- This file is an AbiWord document.                                        -->
<!-- AbiWord is a free, Open Source word processor.                           -->
<!-- More information about AbiWord is available at http://www.abisource.com/ -->
<!-- You should not edit this file by hand.                                   -->
<!-- ======================================================================== -->

<metadata>
<m key="dc.format">application/x-abiword</m>
<m key="abiword.generator">AbiWord</m>
<m key="dc.title">AbiWord Help: How To Export HTML</m>
<m key="abiword.date_last_changed">Fri Sep 19 22:23:38 2003</m>
<m key="dc.creator">Copyright (C) 2003 Francis Franklin</m>
</metadata>
<styles>
<s followedby="Normal" name="Heading 1" basedon="Normal" type="P" props="font-family:Arial; margin-top:0.3056in; font-style:normal; font-weight:bold; lang:en-GB; text-indent:0.00cm; text-align:center; keep-with-next:1; bgcolor:transparent; margin-bottom:0.0417in; line-height:1.000000; font-size:17pt; field-font:NULL"/>
<s type="P" name="Normal" followedby="Current Settings" props="text-indent:0in; field-font:NULL; margin-top:0pt; margin-left:0pt; font-stretch:normal; line-height:1.000000; text-align:left; font-variant:normal; lang:yi; dom-dir:ltr; margin-bottom:0pt; text-decoration:none; font-weight:normal; bgcolor:transparent; color:000000; text-position:normal; font-size:12pt; margin-right:0pt; font-style:normal; widows:2; font-family:Times New Roman"/>
<s followedby="Normal" name="Heading 2" basedon="Normal" type="P" props="margin-top:0.3056in; font-size:14pt; text-indent:0.00cm; margin-bottom:0.0417in; line-height:1.000000; font-weight:bold; keep-with-next:1; font-family:Arial"/>
<s followedby="Normal" name="Heading 3" basedon="Normal" type="P" props="margin-top:0.3056in; font-size:12pt; margin-bottom:0.0417in; line-height:1.000000; font-weight:bold; keep-with-next:1; font-family:Luxi Sans"/>
<s followedby="Current Settings" name="Code" basedon="Plain Text" type="C" props="bgcolor:transparent; font-size:12pt; line-height:1.000000; font-family:Courier; color:0000ff; font-style:normal"/>
<s type="P" name="Plain Text" basedon="Normal" followedby="Current Settings" props="bgcolor:transparent; line-height:1.000000; color:000000; font-family:Courier; dom-dir:ltr"/>
<s type="P" name="Command" basedon="Plain Text" followedby="Current Settings" props="line-height:1.000000; margin-left:0.5000in"/>
<s type="P" name="Block Text" basedon="Normal" followedby="Current Settings" props="line-height:1.000000; margin-bottom:0.0813in; margin-right:1.0000in; margin-left:1.0000in"/>
<s type="P" name="Box List" followedby="Current Settings" props="list-delim:%L; list-decimal:NULL; field-color:transparent; start-value:0; margin-left:0.5000in; field-font:Dingbats; line-height:1.000000; list-style:Box List; text-indent:-0.300000in"/>
<s type="P" name="Bullet List" followedby="Current Settings" props="list-delim:%L; list-decimal:NULL; field-color:transparent; start-value:0; margin-left:0.5000in; field-font:Symbol; line-height:1.000000; list-style:Bullet List; text-indent:-0.300000in"/>
<s followedby="Normal" name="Chapter Heading" basedon="Numbered Heading 1" type="P" props="list-delim:Chapter %L.; field-color:transparent; start-value:1; margin-left:0.0in; field-font:Luxi Sans; text-indent:0.0in; line-height:1.000000; list-style:Numbered List; tabstops:1.100000in/L0"/>
<s type="P" name="Dashed List" followedby="Current Settings" props="list-delim:%L; list-decimal:NULL; field-color:transparent; start-value:0; margin-left:0.5000in; field-font:NULL; line-height:1.000000; list-style:Dashed List; text-indent:-0.300000in"/>
<s type="P" name="Diamond List" followedby="Current Settings" props="list-delim:%L; list-decimal:NULL; field-color:transparent; start-value:0; margin-left:0.5000in; field-font:Dingbats; line-height:1.000000; list-style:Diamond List; text-indent:-0.300000in"/>
<s type="C" name="Endnote Reference" basedon="None" followedby="Current Settings" props="text-position:superscript; line-height:1.000000; font-size:10pt"/>
<s type="C" name="Endnote Text" basedon="Normal" followedby="Current Settings" props="text-position:normal; line-height:1.000000"/>
<s type="C" name="Footnote Reference" basedon="None" followedby="Current Settings" props="text-position:superscript; line-height:1.000000; font-size:10pt"/>
<s type="C" name="Footnote Text" basedon="Normal" followedby="Current Settings" props="text-position:normal; line-height:1.000000; font-size:10pt"/>
<s type="P" name="Hand List" followedby="Current Settings" props="list-delim:%L; list-decimal:NULL; field-color:transparent; start-value:0; margin-left:0.5000in; field-font:Dingbats; line-height:1.000000; list-style:Hand List; text-indent:-0.300000in"/>
<s type="P" name="Heart List" followedby="Current Settings" props="list-delim:%L; list-decimal:NULL; field-color:transparent; start-value:0; margin-left:0.5000in; field-font:Dingbats; line-height:1.000000; list-style:Heart List; text-indent:-0.300000in"/>
<s type="P" name="Implies List" followedby="Current Settings" props="list-delim:%L; list-decimal:NULL; field-color:transparent; start-value:0; margin-left:0.5000in; field-font:Symbol; line-height:1.000000; list-style:Implies List; text-indent:-0.300000in"/>
<s type="P" name="Lower Case List" basedon="Numbered List" followedby="Current Settings" props="list-delim:%L); list-decimal:.; field-color:transparent; start-value:1; margin-left:0.5000in; field-font:NULL; line-height:1.000000; list-style:Lower Case List; text-indent:-0.300000in"/>
<s type="P" name="Lower Roman List" basedon="Normal" followedby="Current Settings" props="list-delim:%L; list-decimal:.; field-color:transparent; start-value:1; margin-left:0.5000in; field-font:NULL; line-height:1.000000; list-style:Lower Roman List; text-indent:-0.300000in"/>
<s followedby="Normal" name="Numbered Heading 1" basedon="Heading 1" type="P" props="list-delim:%L.; field-color:transparent; start-value:1; margin-left:0.0in; field-font:Luxi Sans; text-indent:0.0in; line-height:1.000000; list-style:Numbered List; tabstops:0.299306in/L0"/>
<s followedby="Normal" name="Numbered Heading 2" basedon="Heading 2" type="P" props="list-delim:%L.; field-color:transparent; start-value:1; margin-left:0.0in; field-font:Luxi Sans; text-indent:0.0in; line-height:1.000000; list-style:Numbered List; tabstops:0.299306in/L0"/>
<s followedby="Normal" name="Numbered Heading 3" basedon="Heading 3" type="P" props="list-delim:%L.; field-color:transparent; start-value:1; margin-left:0.0in; field-font:Luxi Sans; text-indent:0.0in; line-height:1.000000; list-style:Numbered List; tabstops:0.299306in/L0"/>
<s type="P" name="Numbered List" followedby="Current Settings" props="list-delim:%L.; list-decimal:.; field-color:transparent; start-value:1; margin-left:0.5000in; field-font:NULL; line-height:1.000000; list-style:Numbered List; text-indent:-0.300000in"/>
<s followedby="Normal" name="Section Heading" basedon="Numbered Heading 1" type="P" props="list-delim:Section %L.; field-color:transparent; start-value:1; margin-left:0.0in; field-font:Luxi Sans; text-indent:0.0in; line-height:1.000000; list-style:Numbered List; tabstops:1.100000in/L0"/>
<s type="P" name="Square List" followedby="Current Settings" props="list-delim:%L; list-decimal:NULL; field-color:transparent; start-value:0; margin-left:0.5000in; field-font:Dingbats; line-height:1.000000; list-style:Square List; text-indent:-0.300000in"/>
<s type="P" name="Star List" followedby="Current Settings" props="list-delim:%L; list-decimal:NULL; field-color:transparent; start-value:0; margin-left:0.5000in; field-font:Dingbats; line-height:1.000000; list-style:Star List; text-indent:-0.300000in"/>
<s type="P" name="Tick List" followedby="Current Settings" props="list-delim:%L; list-decimal:NULL; field-color:transparent; start-value:0; margin-left:0.5000in; field-font:Dingbats; line-height:1.000000; list-style:Tick List; text-indent:-0.300000in"/>
<s type="P" name="Triangle List" followedby="Current Settings" props="list-delim:%L; list-decimal:NULL; field-color:transparent; start-value:0; margin-left:0.5000in; field-font:Dingbats; line-height:1.000000; list-style:Triangle List; text-indent:-0.300000in"/>
<s type="P" name="Upper Case List" basedon="Numbered List" followedby="Current Settings" props="list-delim:%L); list-decimal:.; field-color:transparent; start-value:1; margin-left:0.5000in; field-font:NULL; line-height:1.000000; list-style:Upper Case List; text-indent:-0.300000in"/>
<s type="P" name="Upper Roman List" basedon="Numbered List" followedby="Current Settings" props="list-delim:%L; list-decimal:.; field-color:transparent; start-value:1; margin-left:0.5000in; field-font:NULL; line-height:1.000000; list-style:Upper Roman List; text-indent:-0.300000in"/>
</styles>
<lists>
<l id="1000" parentid="0" type="5" start-value="0" list-delim="%L" list-decimal="NULL"/>
<l id="1008" parentid="0" type="5" start-value="0" list-delim="%L" list-decimal="NULL"/>
</lists>
<pagesize pagetype="A4" orientation="portrait" width="8.267717" height="11.692913" units="in" page-scale="1.000000"/>
<section>
<p style="Heading 1"><c props="lang:en-GB">HTML Export</c><c props="lang:en-GB"></c></p>
<p style="Normal"><c props="font-family:Times New Roman; text-decoration:none; color:000000; lang:en-GB; text-position:normal; font-weight:normal; font-style:normal; font-size:12pt">The are many ways of writing HTML and it is impossible to please everyone. The exporter has been extensively rewritten several times in order to provide HTML code as clean as possible and there are a number of options, described below, controlling document export.</c><c props="font-family:Times New Roman; text-decoration:none; color:000000; lang:en-GB; text-position:normal; font-weight:normal; font-style:normal; font-size:12pt"></c></p>
<p style="Normal"><c props="font-family:Times New Roman; text-decoration:none; color:000000; lang:en-GB; text-position:normal; font-weight:normal; font-style:normal; font-size:12pt"></c><c props="font-family:Times New Roman; text-decoration:none; color:000000; lang:en-GB; text-position:normal; font-weight:normal; font-style:normal; font-size:12pt">In addition to the XHTML exporter there is a `Multipart HTML' exporter which converts the XHTML output (possibly consisting of several files, i.e., images, style sheet) into a single MIME-encoded file (traditionally with the extension .mht). Some web browsers save web pages in this format.</c></p>
<p style="Heading 2"><c props="lang:en-GB">Contents</c><c props="lang:en-GB"></c></p>
<p level="1" listid="1008" parentid="0" style="Normal" props="start-value:0; text-indent:-0.3000in; list-style:Bullet List; field-font:Symbol; margin-left:0.5000in"><c props="list-tag:1009; lang:en-GB"></c><field type="list_label" props="width:0in; font-family:Times New Roman; display:inline; font-variant:normal; font-weight:normal; lang:en-GB; font-style:normal; color:000000; homogeneous:1; bgcolor:transparent; font-size:12pt; text-decoration:none; list-style:Bullet List; height:0in; text-position:normal; font-stretch:normal"></field><c props="width:0in; font-family:Times New Roman; display:inline; font-variant:normal; font-weight:normal; lang:en-GB; font-style:normal; color:000000; homogeneous:1; bgcolor:transparent; font-size:12pt; text-decoration:none; list-style:Bullet List; height:0in; text-position:normal; font-stretch:normal">	</c><a xlink:href="#options"><c props="width:0in; font-family:Times New Roman; display:inline; font-variant:normal; font-weight:normal; lang:en-GB; font-style:normal; color:000000; homogeneous:1; bgcolor:transparent; font-size:12pt; text-decoration:none; list-style:Bullet List; height:0in; text-position:normal; font-stretch:normal">Options</c></a></p>
<p level="1" listid="1008" parentid="0" style="Normal" props="start-value:0; text-indent:-0.3000in; list-style:Bullet List; field-font:Symbol; margin-left:0.5000in"><c props="width:0in; list-tag:1010; font-family:Times New Roman; display:inline; font-style:normal; font-weight:normal; color:000000; lang:en-GB; text-decoration:none; font-variant:normal; list-style:Bullet List; bgcolor:transparent; homogeneous:1; font-size:12pt; height:0in; text-position:normal; font-stretch:normal"></c><field type="list_label" props="width:0in; font-family:Times New Roman; display:inline; font-variant:normal; font-weight:normal; lang:en-GB; font-style:normal; color:000000; homogeneous:1; bgcolor:transparent; font-size:12pt; text-decoration:none; list-style:Bullet List; height:0in; text-position:normal; font-stretch:normal"></field><c props="width:0in; font-family:Times New Roman; display:inline; font-variant:normal; font-weight:normal; lang:en-GB; font-style:normal; color:000000; homogeneous:1; bgcolor:transparent; font-size:12pt; text-decoration:none; list-style:Bullet List; height:0in; text-position:normal; font-stretch:normal">	</c><a xlink:href="#templates"><c props="width:0in; font-family:Times New Roman; display:inline; font-variant:normal; font-weight:normal; lang:en-GB; font-style:normal; color:000000; homogeneous:1; bgcolor:transparent; font-size:12pt; text-decoration:none; list-style:Bullet List; height:0in; text-position:normal; font-stretch:normal">Templates &amp; Command-Line Conversion</c></a></p>
<p style="Heading 2"><c props="lang:en-GB"></c><bookmark type="start" name="options"/><c props="lang:en-GB">Options</c><bookmark type="end" name="options"/></p>
<p level="1" listid="1000" parentid="0" style="Normal" props="start-value:0; text-indent:-0.3000in; list-style:Bullet List; field-font:Symbol; margin-left:0.5000in"><c props="list-tag:1001; lang:en-GB"></c><field type="list_label" props="width:0in; font-family:Times New Roman; display:inline; font-variant:normal; font-weight:normal; lang:en-GB; font-style:normal; color:000000; homogeneous:1; bgcolor:transparent; font-size:12pt; text-decoration:none; list-style:Bullet List; height:0in; text-position:normal; font-stretch:normal"></field><c props="width:0in; font-family:Times New Roman; display:inline; font-variant:normal; font-weight:normal; lang:en-GB; font-style:normal; color:000000; homogeneous:1; bgcolor:transparent; font-size:12pt; text-decoration:none; list-style:Bullet List; height:0in; text-position:normal; font-stretch:normal">	Export as HTML 4.01</c></p>
<p level="1" listid="1000" parentid="0" style="Normal" props="start-value:0; text-indent:-0.3000in; list-style:Bullet List; field-font:Symbol; margin-left:0.5000in"><c props="width:0in; list-tag:1002; font-family:Times New Roman; display:inline; font-style:normal; font-weight:normal; color:000000; lang:en-GB; text-decoration:none; font-variant:normal; list-style:Bullet List; bgcolor:transparent; homogeneous:1; font-size:12pt; height:0in; text-position:normal; font-stretch:normal"></c><field type="list_label" props="width:0in; font-family:Times New Roman; display:inline; font-variant:normal; font-weight:normal; lang:en-GB; font-style:normal; color:000000; homogeneous:1; bgcolor:transparent; font-size:12pt; text-decoration:none; list-style:Bullet List; height:0in; text-position:normal; font-stretch:normal"></field><c props="width:0in; font-family:Times New Roman; display:inline; font-variant:normal; font-weight:normal; lang:en-GB; font-style:normal; color:000000; homogeneous:1; bgcolor:transparent; font-size:12pt; text-decoration:none; list-style:Bullet List; height:0in; text-position:normal; font-stretch:normal">	Export with PHP instructions</c></p>
<p level="1" listid="1000" parentid="0" style="Normal" props="start-value:0; text-indent:-0.3000in; list-style:Bullet List; field-font:Symbol; margin-left:0.5000in"><c props="width:0in; list-tag:1003; font-family:Times New Roman; display:inline; font-style:normal; font-weight:normal; color:000000; lang:en-GB; text-decoration:none; font-variant:normal; list-style:Bullet List; bgcolor:transparent; homogeneous:1; font-size:12pt; height:0in; text-position:normal; font-stretch:normal"></c><field type="list_label" props="width:0in; font-family:Times New Roman; display:inline; font-variant:normal; font-weight:normal; lang:en-GB; font-style:normal; color:000000; homogeneous:1; bgcolor:transparent; font-size:12pt; text-decoration:none; list-style:Bullet List; height:0in; text-position:normal; font-stretch:normal"></field><c props="width:0in; font-family:Times New Roman; display:inline; font-variant:normal; font-weight:normal; lang:en-GB; font-style:normal; color:000000; homogeneous:1; bgcolor:transparent; font-size:12pt; text-decoration:none; list-style:Bullet List; height:0in; text-position:normal; font-stretch:normal">	Declare as XML</c></p>
<p level="1" listid="1000" parentid="0" style="Normal" props="start-value:0; text-indent:-0.3000in; list-style:Bullet List; field-font:Symbol; margin-left:0.5000in"><c props="width:0in; list-tag:1004; font-family:Times New Roman; display:inline; font-style:normal; font-weight:normal; color:000000; lang:en-GB; text-decoration:none; font-variant:normal; list-style:Bullet List; bgcolor:transparent; homogeneous:1; font-size:12pt; height:0in; text-position:normal; font-stretch:normal"></c><field type="list_label" props="width:0in; font-family:Times New Roman; display:inline; font-variant:normal; font-weight:normal; lang:en-GB; font-style:normal; color:000000; homogeneous:1; bgcolor:transparent; font-size:12pt; text-decoration:none; list-style:Bullet List; height:0in; text-position:normal; font-stretch:normal"></field><c props="width:0in; font-family:Times New Roman; display:inline; font-variant:normal; font-weight:normal; lang:en-GB; font-style:normal; color:000000; homogeneous:1; bgcolor:transparent; font-size:12pt; text-decoration:none; list-style:Bullet List; height:0in; text-position:normal; font-stretch:normal">	Allow extra markup in AWML namespace</c></p>
<p level="1" listid="1000" parentid="0" style="Normal" props="start-value:0; text-indent:-0.3000in; list-style:Bullet List; field-font:Symbol; margin-left:0.5000in"><c props="width:0in; list-tag:1005; font-family:Times New Roman; display:inline; font-style:normal; font-weight:normal; color:000000; lang:en-GB; text-decoration:none; font-variant:normal; list-style:Bullet List; bgcolor:transparent; homogeneous:1; font-size:12pt; height:0in; text-position:normal; font-stretch:normal"></c><field type="list_label" props="width:0in; font-family:Times New Roman; display:inline; font-variant:normal; font-weight:normal; lang:en-GB; font-style:normal; color:000000; homogeneous:1; bgcolor:transparent; font-size:12pt; text-decoration:none; list-style:Bullet List; height:0in; text-position:normal; font-stretch:normal"></field><c props="width:0in; font-family:Times New Roman; display:inline; font-variant:normal; font-weight:normal; lang:en-GB; font-style:normal; color:000000; homogeneous:1; bgcolor:transparent; font-size:12pt; text-decoration:none; list-style:Bullet List; height:0in; text-position:normal; font-stretch:normal">	Embed (CSS) style sheet</c></p>
<p level="1" listid="1000" parentid="0" style="Normal" props="start-value:0; text-indent:-0.3000in; list-style:Bullet List; field-font:Symbol; margin-left:0.5000in"><c props="width:0in; list-tag:1006; font-family:Times New Roman; display:inline; font-style:normal; font-weight:normal; color:000000; lang:en-GB; text-decoration:none; font-variant:normal; list-style:Bullet List; bgcolor:transparent; homogeneous:1; font-size:12pt; height:0in; text-position:normal; font-stretch:normal"></c><field type="list_label" props="width:0in; font-family:Times New Roman; display:inline; font-variant:normal; font-weight:normal; lang:en-GB; font-style:normal; color:000000; homogeneous:1; bgcolor:transparent; font-size:12pt; text-decoration:none; list-style:Bullet List; height:0in; text-position:normal; font-stretch:normal"></field><c props="width:0in; font-family:Times New Roman; display:inline; font-variant:normal; font-weight:normal; lang:en-GB; font-style:normal; color:000000; homogeneous:1; bgcolor:transparent; font-size:12pt; text-decoration:none; list-style:Bullet List; height:0in; text-position:normal; font-stretch:normal">	Embed images in URLs (Base64-encoded)</c></p>
<p style="Heading 3"><c props="lang:en-GB; display:inline; height:0in; width:0in; homogeneous:1">Export as HTML 4.01</c><c props="lang:en-GB; display:inline; height:0in; width:0in; homogeneous:1"></c></p>
<p style="Normal"><c props="lang:en-GB">AbiWord's HTML exporter has always given the user a choice between HTML and XHTML, the latter being XML and thus easier to handle (and ideally to re-import, although this has been an elusive goal). Some people still prefer the traditional HTML, since some browsers don't understand that XHTML is HTML and not just XML (which can almost anything), but increasingly XHTML is preferred and best-understood.</c><c props="lang:en-GB"></c></p>
<p style="Normal"><c props="lang:en-GB">If exporting as HTML then the document will not be declared as XML and markup in the AWML namespace will not be possible, since these options are specific to XHTML.</c><c props="lang:en-GB"></c></p>
<p style="Heading 3"><c props="lang:en-GB">Export with PHP instructions</c><c props="lang:en-GB"></c></p>
<p style="Normal"><c props="lang:en-GB">This option is seldom (if ever) used but may be of interest. Many websites these days use PHP to give webpages a `corporate look and feel' or to provide a dynamic element to layout. HTML documents have simple </c><c props="lang:en-GB"></c><c style="Code" props="lang:en-GB">&lt;?php</c><c props="lang:en-GB"> (or the older </c><c style="Code" props="lang:en-GB">&lt;?</c><c props="lang:en-GB"> ) instructions embedded at the top and bottom and these replace all the site-specific markup. (Often the resulting document is barely recognisable as HTML!)</c></p>
<p style="Normal"><c props="lang:en-GB">If this option is selected then AbiWord inserts </c><c props="lang:en-GB"></c><c style="Code" props="lang:en-GB">&lt;?php include ...</c><c props="lang:en-GB"> statements in the head and at the beginning and end of the body of the HTML document. NOTE: Since some versions of PHP get confused by other processing instructions, such as </c><c style="Code" props="lang:en-GB">&lt;?xml</c><c props="lang:en-GB"> , it may be necessary to uncheck the `Declare as XML' option.</c></p>
<p style="Normal"><c props="lang:en-GB">Unfortunately this is not very customisable and AbiWord's new XHTML template system, available only through command-line conversion of documents to XHTML, can be used to much greater effect.</c><c props="lang:en-GB"></c></p>
<p style="Heading 3"><c props="lang:en-GB">Declare as XML</c><c props="lang:en-GB"></c></p>
<p style="Normal"><c props="lang:en-GB">XML documents, including XHTML ones, normally start with a line declaring them to be XML. This line is something like:</c><c props="lang:en-GB"></c></p>
<p style="Normal"><c props="lang:en-GB">	</c><c props="lang:en-GB"></c><c style="Code" props="lang:en-GB">&lt;?xml version="1.0"?&gt;</c></p>
<p style="Normal"><c props="lang:en-GB"></c><c props="lang:en-GB">Some (old) web browsers see this and get confused, and some versions of PHP also get confused because </c><c style="Code" props="lang:en-GB">&lt;?</c><c props="lang:en-GB"> used to be regarded as a PHP insertion point.</c></p>
<p style="Normal"><c props="lang:en-GB">If saving as HTML then this option is irrelevant; if as XHTML then uncheck this option to suppress the declaration.</c><c props="lang:en-GB"></c></p>
<p style="Heading 3"><c props="lang:en-GB">Allow extra markup in AWML namespace</c><c props="lang:en-GB"></c></p>
<p style="Normal"><c props="lang:en-GB">This option is specific to XHTML since it uses XML namespaces to add extra information to the HTML document. However, </c><c props="lang:en-GB"></c><c props="font-style:italic; lang:en-GB">this is </c><c props="lang:en-GB; text-decoration:underline; font-style:italic">not</c><c props="font-style:italic; lang:en-GB"> correctly functional at the moment and its use is </c><c props="lang:en-GB; text-decoration:underline; font-style:italic">not</c><c props="font-style:italic; lang:en-GB"> recommended</c><c props="lang:en-GB">.</c></p>
<p style="Heading 3"><c props="lang:en-GB">Embed (CSS) style sheet</c><c props="lang:en-GB"></c></p>
<p style="Normal"><c props="lang:en-GB">AbiWord generates a lot of style-sheet information related to document styles and this can be embedded within the HTML document in a </c><c props="lang:en-GB"></c><c style="Code" props="lang:en-GB">&lt;style&gt;&lt;!-- --&gt;&lt;/style&gt;</c><c props="lang:en-GB"> section or saved to an external style sheet (</c><c props="font-style:italic; lang:en-GB">filename</c><c props="lang:en-GB">.html_files/style.css). The former is generally more useful; if an external style sheet is used on the website then it may be best to use the PHP option or, if converting from the command line, an XHTML template.</c></p>
<p style="Heading 3"><c props="lang:en-GB">Embed images in URLs (Base64-encoded)</c><c props="lang:en-GB"></c></p>
<p style="Normal"><c props="lang:en-GB">Images in the AbiWord document are normally saved in a subdirectory (</c><c props="lang:en-GB"></c><c props="font-family:Times New Roman; text-decoration:none; color:000000; lang:en-GB; text-position:normal; font-weight:normal; font-style:italic; font-size:12pt">filename</c><c props="font-family:Times New Roman; text-decoration:none; color:000000; lang:en-GB; text-position:normal; font-weight:normal; font-style:normal; font-size:12pt">.html_files/</c><c props="lang:en-GB">) and referenced by hyperlink (</c><c style="Code" props="lang:en-GB">&lt;img src="filename.html_files/ ... </c><c props="lang:en-GB">) but there is a mechanism for saving images within the HTML file itself (although this is generally frowned upon).</c></p>
<p style="Heading 2"><bookmark type="start" name="templates"/><c props="lang:en-GB">Templates &amp; Command-Line Conversion</c><c props="lang:en-GB"></c><bookmark type="end" name="templates"/></p>
<p style="Normal"><c props="lang:en-GB">AbiWord-2.0 has a (still experimental) XHTML template mechanism that can be used when using AbiWord as a command-line tool to convert documents to HTML.</c><c props="lang:en-GB"></c></p>
<p style="Normal"><c props="lang:en-GB">The simplest way to convert a file to HTML using AbiWord, on Unix systems at least, is:</c><c props="lang:en-GB"></c></p>
<p style="Command">AbiWord --to=html file.abw</p>
<p style="Normal">which will import <c props="font-style:italic">file.abw</c><c props="font-style:italic"></c> and export as HTML to <c props="font-style:italic">file.html</c> using default options.</p>
<p style="Normal">It is possible, however, to specify export options on the command line using <c style="Code">--exp-props</c><c style="Code"></c>:</p>
<p style="Command">AbiWord --to=html file.abw --exp-props="html4: yes"</p>
<p style="Normal">The above command specifies that the output is to be HTML 4.01 and not XHTML. All six export options can be specified in this manner: <c style="Code">html4</c><c style="Code"></c>, <c style="Code">php-includes</c>, <c style="Code">declare-xml</c>, <c style="Code">use-awml</c>, <c style="Code">embed-css</c> and <c style="Code">embed-images</c>. Each takes a <c style="Code">yes</c> or <c style="Code">no</c>, and multiple options can specified, e.g.:</p>
<p style="Command">--exp-props="html4: no; declare-xml: no; embed-css: yes"</p>
<p style="Normal">The <c style="Code">--exp-props</c><c style="Code"></c> argument can be used to define an arbitrary number of property name-value pairs. The above six options are <c props="text-decoration:underline; font-weight:normal; font-style:italic">reserved</c> property names; there are two other reserved property names associated with XHTML templates: <c style="Code">html-template</c> and <c style="Code">href-prefix</c>.</p>
<p style="Heading 3">XHTML Templates (EXPERIMENTAL)</p>
<p style="Normal"><c></c>The XHTML template is a skeleton XHTML document which the exporter first imports and then exports again with modifications. The template contains <c props="font-style:italic">Processing Instructions</c><c props="font-style:italic"></c> which instruct the exporter to insert, e.g., the document title or the document text.</p>
<p style="Normal">All of the exporter's processing instructions have the form <c style="Code">&lt;?abi-xhtml- ... ?&gt;</c><c style="Code"></c>, e.g.:</p>
<p style="Command">&lt;?abi-xhtml-insert title?&gt;</p>
<p style="Command">&lt;?abi-xhtml-insert meta?&gt;</p>
<p style="Command">&lt;?abi-xhtml-insert body?&gt;</p>
<p style="Normal">In the output, these instructions are replaced with, respectively, the document's title (from the document properties, as text), the document's metadata (document properties, etc., as HTML <c style="Code">&lt;meta ... /&gt;</c><c style="Code"></c>), and the document's content (as HTML, inside of the usual <c style="Code">&lt;body&gt;...&lt;/body&gt;</c>).</p>
<p style="Normal"><c></c>The template system was written primarily for the AbiWord documentation. The goal was to provide a navigation menu for the AbiWord bundled help documentation. This consists of about 100 AbiWord documents, in several folders, which need to be converted to HTML. The navigation menu needed submenus, and the menu item corresponding to the current webpage needed to be highlighted, etc., and all using only HTML, CSS and relative links between webpages, images and style sheets.</p>
<p style="Normal">To achieve this with a single template an element of flow control is necessary, and this is achieved by defining variables in the <c style="Code">--exp-props</c> argument, e.g.:</p>
<p style="Command">--exp-props="active-menu: howto"</p>
<p style="Normal">One conditional mechanism is substitution in comments. The following in the template:</p>
<p style="Command">&lt;style&gt;</p>
<p style="Command">&lt;?abi-xhtml-comment-replace property="active-menu" comment="</p>
<p style="Command">tr.menu td.$$ div {</p>
<p style="Command">background-color: #0000ff;</p>
<p style="Command">text-decoration: underline;</p>
<p style="Command">}</p>
<p style="Command">"?&gt;</p>
<p style="Command">&lt;/style&gt;</p>
<p style="Normal">will produce the following in the exported XHTML:</p>
<p style="Command">&lt;style&gt;</p>
<p style="Command">&lt;!--</p>
<p style="Command">tr.menu td.howto div {</p>
<p style="Command"><c props="font-family:Courier; font-size:12pt; color:000000; text-decoration:none; text-position:normal; font-weight:normal; font-style:normal; lang:yi">background-color: #0000ff;</c></p>
<p style="Command" props="margin-top:0.0000in; margin-left:0.5000in; text-indent:0.0000in; dom-dir:ltr; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Courier; font-size:12pt; color:000000; lang:yi; text-position:normal; font-weight:normal; font-style:normal; text-decoration:none">text-decoration: underline;</c></p>
<p style="Command" props="margin-top:0.0000in; margin-left:0.5000in; text-indent:0.0000in; dom-dir:ltr; margin-bottom:0.0000in; line-height:1.000000; text-align:left; margin-right:0.0000in"><c props="font-family:Courier; font-size:12pt; color:000000; lang:yi; text-position:normal; font-weight:normal; font-style:normal; text-decoration:none">}</c></p>
<p style="Command">--&gt;</p>
<p style="Command">&lt;/style&gt;</p>
<p style="Normal">since the <c style="Code">$$</c> in the processing instruction comment text is replaced by he value (<c style="Code">howto</c>) of the specified property (<c style="Code">active-menu</c>).</p>
<p style="Normal">The principal flow-control mechanism, however, is the use of <c style="Code">&lt;?abi-xhtml-if </c><c style="Code" props="font-style:italic">condition</c><c style="Code">?&gt; ... &lt;?abi-xhtml-fi ?&gt;</c> where everything between the two processing instructions is ignored if <c style="Code" props="font-style:italic">condition</c> is false. Unfortunately, the condition syntax is currently very limited (e.g., <c style="Code">&lt;?abi-xhtml-if active-menu==howto?&gt;</c>) and is likely to be rewritten. (These should be nestable.)</p>
<p style="Normal">Another processing instruction is <c style="Code">&lt;?abi-xhtml-menuitem ...?&gt;</c> which creates a table cell of one sort or another with the specified label text.</p>
<p style="Normal">Finally, to make relative links between resources possible, link addresses which start with a <c style="Code">$</c> (e.g., <c style="Code">&lt;a href="$/about.html"&gt;</c> and <c style="Code">&lt;img src="$/images/logo.jpg" /&gt;</c>) will have the <c style="Code">$</c> substituted with the value of property <c style="Code">href-prefix</c>, e.g.:</p>
<p style="Command">--exp-props="html-template: normal.html; href-prefix: .."</p>
<p style="Normal">This tells Abiword to use the template <c props="font-style:italic">normal.html</c> in the current directory and to prefix all links (marked with an initial <c style="Code">$</c>) with the path <c style="Code">..</c> so <c style="Code">&lt;a href="$/about.html"&gt;</c> will change to <c style="Code">&lt;a href="../about.html"&gt;</c>, and so on.</p>
<p style="Normal">The best example of XHTML template usage is in AbiWord's abiword-docs CVS module in the directory abiword-docs/ABW/en-US/template/.</p>
</section>
</abiword>
