Skip to content

Nested paragraphs in generated document #2

@jimka

Description

@jimka

When I try to generate a odt document from a simple docbook xml (containing a table) the resulting content.xml file in the odt document is created with nested <text:p>-nodes. The final result is that any text in the table is not interpreted by openoffice/libreoffice properly.

Example:

    <text:p text:style-name="Standard"><text:p text:style-name="para-padding">One</text:p></text:p>

If I manually edit the xml-document and remove one of the <text:p>-nodes the document is displayed normally.

Steps to reproduce:

Save the following docbook xml and run it through docbook2odt

  <?xml version="1.0" encoding="UTF-8"?>
  <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
  <?asciidoc-toc?>
  <?asciidoc-numbered?>
  
  <article lang="en">
  <articleinfo>
      <title>Title 1</title>
  </articleinfo>
  <section id="_title_2">
  <title>Title 2</title>
  <informaltable
  frame="all"
  rowsep="1" colsep="1"
  >
  <tgroup cols="2">
  <colspec colname="col_1" colwidth="0*"/>
  <colspec colname="col_2" colwidth="99*"/>
  <tbody>
  <row>
  <entry align="left" valign="top"><simpara>One</simpara></entry>
  <entry align="left" valign="top"><simpara>Two</simpara></entry>
  </row>
  <row>
  <entry align="left" valign="top"><simpara>Three</simpara></entry>
  <entry align="left" valign="top"><simpara>Four</simpara></entry>
  </row>
  </tbody>
  </tgroup>
  </informaltable>
  </section>
  </article>

The resulting table in the content.xml-file in the odt-document will have nestled <text:p>-nodes and openoffice/libreoffice won't be able to render the cell-contents properly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions