How do you convert LibreOffice to DocBook format

IS there an export tool to convert a LibreOffice Writer document to DocBook format ?

Have you tried simply File → Save As, and then selecting “DocBook (.xml)”?

While this is the correct method, there are currently numerous problems with the output filter e.g., tdf#50585, tdf#55382, and tdf#55383.

Ok, I’ll ask the next question:
IS there an export tool to convert a LibreOffice Writer document to DocBook format correctly?
The Save As dumps everything that isn’t below a 1st level heading.

Is this a response to the answer “try Save as > DocBook”, or to the original question? Please add it as a comment below the answer or question, or ask a new question. Thanks!

I have searched about DOCBOOK in this forum and I’m surprise to found only 2 or 3 topics !

I agree with wmiklos. LibreOffice implementation of export to DOCBOOK is very ridiculous !!! Sorry

I will explain Why.

I’m developper and I search a solution to generate centrally a documentation that, by process, can automatically generate a paper/printable document like PDF and a HTML documentation.

DOCBOOK seems to be THE solution

but DOCBOOK doesn’t correct my orthography … like LibreOffice
but DOCBOOK doesn’t propose any convivial editor program to create it … like LibreOffice

Actually, I write my DOCBOOK tags directly in LibreOffice because LibreOffice correct my orthography and split line when line are to long (not like under Notepad++)

The problem now is that LibreOffice (MS Office too) is not able to work fine with DOCBOOK XML tags !

I have analyzed quickly your XML in a file of FODT type.

I think that the first things to do is to define a set of styles that correspond to DOCBOOK tags like <chapter> or or and to define these DOCBOOK in FODT schema.

I have created a line with text “1. MY FIRST CHAPTER” and I have assigned Heading1 to this line.
When I save my file in DOCBOOK format, LibreOffice write something like

<text:p text:style-name=“P24”>

I think it is possible to replace that with

docbooktext:chapter and to modify the code to generate same thing that text:p normally generates.

It is a great work, I know, but …

10 years ago, OpenOffice was the first free Editor (that I know) to offer MS Office quality and to generate PDF file.
Now, MS Office offer this functionnality.

Why not do same thing for DOCBOOK in LibreOffice ?

But I talk, and what I write is perhaps what LibreOffice are already doing :slight_smile: