https://bugs.documentfoundation.org/show_bug.cgi?id=102849

            Bug ID: 102849
           Summary: Semantic XHTML conversion: heading root mismatch
           Product: LibreOffice
           Version: 5.1.4.1 rc
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: filters and storage
          Assignee: [email protected]
          Reporter: [email protected]

The current LibreOffice behavior produces XHTML exports with an HTML
heading hierarchy not strictly and semantically corresponding to the
heading hierarchy of the ODF document.

Concretely LibreOffice produces XHTML exports with many <h1> headings.
While for an (X)HTML document to be semantically correct, there must be
one and only one <h1> per document. And the heading hierarchy should
then follow, <h2>, <h3>, etc. down maximum to <h6>.

The current LibreOffice behavior produces the following XHTML export of
the given ODT file:

    <p class="Title">Titre principal</p>

    <h1 class="Heading_20_1"><a id="a__Titre_1"><span/></a>Titre 1</h1>
    <p class="P1">para</p>

    <h2 class="Heading_20_2"><a id="a__Titre_2"><span/></a>Titre 2</h2>
    <p class="P1">para</p>

    <h3 class="Heading_20_3"><a id="a__Titre_3"><span/></a>Titre 3</h3>
    <p class="P1">para</p>

while we want to have the following:

    <h1>Titre principal</h1>

    <h2 class="whatever"><a id="a__Titre_1"><span/></a>Titre 1</h1>
    <p class="P1">para</p>

    <h3 class="whatever_else"><a id="a__Titre_2"><span/></a>Titre 2</h3>
    <p class="P1">para</p>

    <h4 class="whatever_again"><a id="a__Titre_3"><span/></a>Titre 3</h4>
    <p class="P1">para</p>


Technical explanation of the current LibreOffice bug:

Title has child Heading1. Heading1 has child Heading2. Heading2 has
child Heading3. etc. And Title is the root of the ODF heading hierarchy.
Es gibt:
Title→Heading1→Heading2→Heading3→etc.

As h1 is the root of the (X)HTML hierarchy, in XHTML the heading
hierarchy is:
h1→h2→h3→h4→etc.

The current LibreOffice behavior is the following:
Title→Heading1→Heading2→Heading3→etc.
=>
p→h1→h2→h3→etc.

while it should logically and semantically be:
h1→h2→h3→h4→etc.

This is a heading root mismatch between ODF and (X)HTML export

Changing this behaviour could be implemented as a filterOption that would
postprocess the current output

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to