+write_footnote (struct odt_driver *odt, const char *footnote)
+{
+ char marker[16];
+
+ xmlTextWriterStartElement (odt->content_wtr, _xml("text:note"));
+ xmlTextWriterWriteAttribute (odt->content_wtr, _xml("text:note-class"),
+ _xml("footnote"));
+
+ xmlTextWriterStartElement (odt->content_wtr, _xml("text:note-citation"));
+ str_format_26adic (++odt->n_footnotes, false, marker, sizeof marker);
+ if (strlen (marker) > 1)
+ xmlTextWriterWriteFormatAttribute (odt->content_wtr, _xml("text:label"),
+ "(%s)", marker);
+ else
+ xmlTextWriterWriteAttribute (odt->content_wtr, _xml("text:label"),
+ _xml(marker));
+ xmlTextWriterEndElement (odt->content_wtr);
+
+ xmlTextWriterStartElement (odt->content_wtr, _xml("text:note-body"));
+ xmlTextWriterStartElement (odt->content_wtr, _xml("text:p"));
+ write_xml_with_line_breaks (odt, footnote);
+ xmlTextWriterEndElement (odt->content_wtr);
+ xmlTextWriterEndElement (odt->content_wtr);
+
+ xmlTextWriterEndElement (odt->content_wtr);
+}
+
+static void
+write_table (struct odt_driver *odt, const struct table_item *item)