home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 September / Chip_2004-09_cd1.bin / software / abi / setup.exe / AbiWord / howtoexporthtml.abw < prev    next >
Extensible Markup Language  |  2004-07-11  |  34KB  |  137 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE abiword PUBLIC "-//ABISOURCE//DTD AWML 1.0 Strict//EN" "http://www.abisource.com/awml.dtd">
  3. <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">
  4. <!-- ======================================================================== -->
  5. <!-- This file is an AbiWord document.                                        -->
  6. <!-- AbiWord is a free, Open Source word processor.                           -->
  7. <!-- More information about AbiWord is available at http://www.abisource.com/ -->
  8. <!-- You should not edit this file by hand.                                   -->
  9. <!-- ======================================================================== -->
  10.  
  11. <metadata>
  12. <m key="dc.format">application/x-abiword</m>
  13. <m key="abiword.generator">AbiWord</m>
  14. <m key="dc.title">AbiWord Help: How To Export HTML</m>
  15. <m key="abiword.date_last_changed">Fri Sep 19 22:23:38 2003</m>
  16. <m key="dc.creator">Copyright (C) 2003 Francis Franklin</m>
  17. </metadata>
  18. <styles>
  19. <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"/>
  20. <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"/>
  21. <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"/>
  22. <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"/>
  23. <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"/>
  24. <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"/>
  25. <s type="P" name="Command" basedon="Plain Text" followedby="Current Settings" props="line-height:1.000000; margin-left:0.5000in"/>
  26. <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"/>
  27. <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"/>
  28. <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"/>
  29. <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"/>
  30. <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"/>
  31. <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"/>
  32. <s type="C" name="Endnote Reference" basedon="None" followedby="Current Settings" props="text-position:superscript; line-height:1.000000; font-size:10pt"/>
  33. <s type="C" name="Endnote Text" basedon="Normal" followedby="Current Settings" props="text-position:normal; line-height:1.000000"/>
  34. <s type="C" name="Footnote Reference" basedon="None" followedby="Current Settings" props="text-position:superscript; line-height:1.000000; font-size:10pt"/>
  35. <s type="C" name="Footnote Text" basedon="Normal" followedby="Current Settings" props="text-position:normal; line-height:1.000000; font-size:10pt"/>
  36. <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"/>
  37. <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"/>
  38. <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"/>
  39. <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"/>
  40. <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"/>
  41. <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"/>
  42. <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"/>
  43. <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"/>
  44. <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"/>
  45. <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"/>
  46. <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"/>
  47. <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"/>
  48. <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"/>
  49. <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"/>
  50. <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"/>
  51. <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"/>
  52. </styles>
  53. <lists>
  54. <l id="1000" parentid="0" type="5" start-value="0" list-delim="%L" list-decimal="NULL"/>
  55. <l id="1008" parentid="0" type="5" start-value="0" list-delim="%L" list-decimal="NULL"/>
  56. </lists>
  57. <pagesize pagetype="A4" orientation="portrait" width="8.267717" height="11.692913" units="in" page-scale="1.000000"/>
  58. <section>
  59. <p style="Heading 1"><c props="lang:en-GB">HTML Export</c><c props="lang:en-GB"></c></p>
  60. <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>
  61. <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>
  62. <p style="Heading 2"><c props="lang:en-GB">Contents</c><c props="lang:en-GB"></c></p>
  63. <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>
  64. <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 & Command-Line Conversion</c></a></p>
  65. <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>
  66. <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>
  67. <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>
  68. <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>
  69. <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>
  70. <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>
  71. <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>
  72. <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>
  73. <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>
  74. <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>
  75. <p style="Heading 3"><c props="lang:en-GB">Export with PHP instructions</c><c props="lang:en-GB"></c></p>
  76. <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"><?php</c><c props="lang:en-GB"> (or the older </c><c style="Code" props="lang:en-GB"><?</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>
  77. <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"><?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"><?xml</c><c props="lang:en-GB"> , it may be necessary to uncheck the `Declare as XML' option.</c></p>
  78. <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>
  79. <p style="Heading 3"><c props="lang:en-GB">Declare as XML</c><c props="lang:en-GB"></c></p>
  80. <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>
  81. <p style="Normal"><c props="lang:en-GB">    </c><c props="lang:en-GB"></c><c style="Code" props="lang:en-GB"><?xml version="1.0"?></c></p>
  82. <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"><?</c><c props="lang:en-GB"> used to be regarded as a PHP insertion point.</c></p>
  83. <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>
  84. <p style="Heading 3"><c props="lang:en-GB">Allow extra markup in AWML namespace</c><c props="lang:en-GB"></c></p>
  85. <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>
  86. <p style="Heading 3"><c props="lang:en-GB">Embed (CSS) style sheet</c><c props="lang:en-GB"></c></p>
  87. <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"><style><!-- --></style></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>
  88. <p style="Heading 3"><c props="lang:en-GB">Embed images in URLs (Base64-encoded)</c><c props="lang:en-GB"></c></p>
  89. <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"><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>
  90. <p style="Heading 2"><bookmark type="start" name="templates"/><c props="lang:en-GB">Templates & Command-Line Conversion</c><c props="lang:en-GB"></c><bookmark type="end" name="templates"/></p>
  91. <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>
  92. <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>
  93. <p style="Command">AbiWord --to=html file.abw</p>
  94. <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>
  95. <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>
  96. <p style="Command">AbiWord --to=html file.abw --exp-props="html4: yes"</p>
  97. <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>
  98. <p style="Command">--exp-props="html4: no; declare-xml: no; embed-css: yes"</p>
  99. <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>
  100. <p style="Heading 3">XHTML Templates (EXPERIMENTAL)</p>
  101. <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>
  102. <p style="Normal">All of the exporter's processing instructions have the form <c style="Code"><?abi-xhtml- ... ?></c><c style="Code"></c>, e.g.:</p>
  103. <p style="Command"><?abi-xhtml-insert title?></p>
  104. <p style="Command"><?abi-xhtml-insert meta?></p>
  105. <p style="Command"><?abi-xhtml-insert body?></p>
  106. <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"><meta ... /></c><c style="Code"></c>), and the document's content (as HTML, inside of the usual <c style="Code"><body>...</body></c>).</p>
  107. <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>
  108. <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>
  109. <p style="Command">--exp-props="active-menu: howto"</p>
  110. <p style="Normal">One conditional mechanism is substitution in comments. The following in the template:</p>
  111. <p style="Command"><style></p>
  112. <p style="Command"><?abi-xhtml-comment-replace property="active-menu" comment="</p>
  113. <p style="Command">tr.menu td.$$ div {</p>
  114. <p style="Command">background-color: #0000ff;</p>
  115. <p style="Command">text-decoration: underline;</p>
  116. <p style="Command">}</p>
  117. <p style="Command">"?></p>
  118. <p style="Command"></style></p>
  119. <p style="Normal">will produce the following in the exported XHTML:</p>
  120. <p style="Command"><style></p>
  121. <p style="Command"><!--</p>
  122. <p style="Command">tr.menu td.howto div {</p>
  123. <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>
  124. <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>
  125. <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>
  126. <p style="Command">--></p>
  127. <p style="Command"></style></p>
  128. <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>
  129. <p style="Normal">The principal flow-control mechanism, however, is the use of <c style="Code"><?abi-xhtml-if </c><c style="Code" props="font-style:italic">condition</c><c style="Code">?> ... <?abi-xhtml-fi ?></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"><?abi-xhtml-if active-menu==howto?></c>) and is likely to be rewritten. (These should be nestable.)</p>
  130. <p style="Normal">Another processing instruction is <c style="Code"><?abi-xhtml-menuitem ...?></c> which creates a table cell of one sort or another with the specified label text.</p>
  131. <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"><a href="$/about.html"></c> and <c style="Code"><img src="$/images/logo.jpg" /></c>) will have the <c style="Code">$</c> substituted with the value of property <c style="Code">href-prefix</c>, e.g.:</p>
  132. <p style="Command">--exp-props="html-template: normal.html; href-prefix: .."</p>
  133. <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"><a href="$/about.html"></c> will change to <c style="Code"><a href="../about.html"></c>, and so on.</p>
  134. <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>
  135. </section>
  136. </abiword>
  137.