OpenDocument (ODT) is an open, paper-oriented document encoding format submitted to ISO for standardization under ISO 26300. ODT is essentially the open source answer to Microsoft Word’s format, and the default format used by both LibreOffice Writer and Apache OpenOffice Writer. It’s also been supported by Microsoft Word itself for over a decade.
An ODT file consists of a zip file which contains the text document encoded in XML and embedded resources as separate files.
Example
<text:h text:style-name="Heading_20_1" text:outline-level="1"><text:bookmark-start
text:name="this-is-a-level-1-heading" />This is a level 1 heading<text:bookmark-end
text:name="this-is-a-level-1-heading" /></text:h>
<text:h text:style-name="Heading_20_2" text:outline-level="2"><text:bookmark-start
text:name="this-is-a-level-2-heading" />This is a level 2 heading<text:bookmark-end
text:name="this-is-a-level-2-heading" /></text:h>
<text:p text:style-name="First_20_paragraph">This is text in <text:span text:style-name="T1">bold</text:span> and
<text:span text:style-name="T2">italics</text:span>, and this is an external link to <text:a xlink:type="simple"
xlink:href="https://docops.guide" office:name="">
<text:span text:style-name="Definition">DocOps</text:span>
</text:a>. Now, some bullet points:</text:p>
<text:list text:style-name="L1">
<text:list-item>
<text:p text:style-name="P1">Bullet point 1</text:p>
</text:list-item>
<text:list-item>
<text:p text:style-name="P1">Bullet point 2</text:p>
</text:list-item>
<text:list-item>
<text:p text:style-name="P1">Bullet point 3</text:p>
</text:list-item>
</text:list>
The above file represents a snippet taken from content.xml
, assuming the below directory structure:
META-INF
META-INF/manifest.xml
content.xml
manifest.rdf
mimetype
meta.xml
styles.xml
The example has been generated using Pandoc from the markdown version.
© 2022-2024 Ernesto Garbarino | Contact me at ernesto@garba.org