xml2odf.docbook 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <?xml version="1.0" ?>
  2. <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
  4. <refentry id="xml2odf">
  5. <refentryinfo>
  6. <productname>odfpy</productname>
  7. <author><firstname>Søren</firstname><surname>Roug</surname>
  8. <contrib>Original author</contrib>
  9. </author>
  10. </refentryinfo>
  11. <refmeta>
  12. <refentrytitle>xml2odf</refentrytitle>
  13. <manvolnum>1</manvolnum>
  14. <refmiscinfo class="manual">User commands</refmiscinfo>
  15. </refmeta>
  16. <refnamediv>
  17. <refname>xml2odf</refname>
  18. <refpurpose>Create ODF package from OpenDocument in XML form</refpurpose>
  19. </refnamediv>
  20. <refsynopsisdiv>
  21. <cmdsynopsis>
  22. <command>xml2odf</command>
  23. <arg choice="opt">-o <replaceable>outputfile</replaceable></arg>
  24. <arg choice="opt">-s</arg>
  25. <arg choice="opt"><replaceable>inputfile</replaceable></arg>
  26. </cmdsynopsis>
  27. </refsynopsisdiv>
  28. <refsect1><title>Description</title>
  29. <para>
  30. OpenDocument can be a complete office document in a single
  31. XML file. The script will take such a document and create a package.
  32. This is mainly useful as a postprocesser of a program producing XML,
  33. such as a stylesheet.
  34. </para>
  35. <para>
  36. <quote>Inputfile</quote> is assumed to be an
  37. OpenDocument file in XML form.
  38. If there is no inputfile, the program will read from standard input.
  39. The flag -s adds correct suffix to the filename according to what mime type
  40. is found in the XML file, in cause you don't know already what document
  41. type you are packaging.
  42. </para>
  43. <para>
  44. If output file is not specified output will be to standard out.
  45. </para>
  46. <para>
  47. Section 2.1.1 of <citetitle>Open Document Format for Office Applications</citetitle>
  48. says that the [content.xml] file contains the document content, along with the
  49. <emphasis>automatic styles</emphasis> needed for the document content.
  50. The [styles.xml] file contains all the named styles of a document, along with
  51. the <emphasis>automatic styles</emphasis> needed for the named styles.
  52. The application doesn't know which automatic style is needed for what, so
  53. it puts the same set of automatic styles into both files.
  54. </para>
  55. <para>
  56. One could assume that the inverse operation would be easier, but OpenOffice.org
  57. is quite happy to use the same names for two different automatic styles. For instance, a
  58. style used inside &lt;style:footer&gt; can have the same name as one used inside
  59. &lt;office:text&gt; but be a different paragraph style.
  60. This is reported as bug #90494 (http://www.openoffice.org/issues/show_bug.cgi?id=90494)
  61. </para>
  62. </refsect1>
  63. <refsect1><title>Example</title>
  64. <screen>
  65. xml2odf -o testdocument -s xml-file
  66. </screen>
  67. </refsect1>
  68. <refsect1><title>See Also</title>
  69. <para>
  70. <command>odftools</command>(1),
  71. <command>odf2xml</command>(1)
  72. </para>
  73. </refsect1>
  74. <refsect1><title>Bugs</title>
  75. <para>
  76. Doesn't handle external data -- images and such.
  77. </para>
  78. <para>
  79. The library used for the parsing of XML expands empty elements from
  80. &lt;element/&gt; to &lt;element&gt;&lt;/element&gt;. It should not have
  81. an effect on the document parsing.
  82. </para>
  83. </refsect1>
  84. </refentry>