Prince J. wrote:

Thanks for your help earlier. I am very close to finishing my end-to-end
conversion POC.



I am facing an issue though. This is happening in a couple of places in
the document, text segments that are supposed to be at the same level
are split into separate listitems. E.g.,:





Points 4.1 through 4.6 have the same custom style and they should be
treated the same, but in this case 4.1 and 4.2 are enclosed in one
listitem while the rest are enclosed in another listitem. There is an
additional para element in between, but other such elements/listitems
are handled without any discrepancies. Please advise.

I'm sorry but the EULA_HS.xml you attached to your email cannot be something generated using w2x. Root element is missing the DocBook 5 namespace.

I've regenerated attached EULA.xml [DELETED] by running:
---
w2x -f EULA.options EULA.docx EULA.xml
---

and from "11. Other Important Information", there are no <listitem>s. See attached screenshot [DELETED].

My DocBook 5 result is indeed ugly but consistent with the sequence:

EULA H1) Other Important Information
EULA H2) 11.1. Disclaimer of Warranty. TO THE EXTENT PERMITTED BY APPLICABLE LAW, ACME Corp....
EULA H2) 11.2. Limitation of Liability. SOME STATES AND JURISDICTION...
EULA Para) TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW AND...
EULA H2) 11.3. Proprietary Rights. ACME Corp. retains ownership...
EULA H2) 11.4. Force Majeure. ACME Corp. shall not be response...

w2x has a rule[*] which states that when a level #N heading is immediately followed by another level "N heading, then the second one does not generate a section but a mere bridgehead. This is was happens.

[*] excerpts from <w2x_install_dir>/xed/sections.xed:
---
...
for-each /html/body/* {
if (self::h1 or self::h2 or self::h3 or self::h4 or self::h5 or self::h6)
        and get-class("/^role-bridgehead/") = "" {
(: <h1 class="role-bridgehead1"> not a real heading. See title.xed. :)

         set-variable("name1", local-name());
         set-variable("name2",
concat("role-bridgehead", substring-after($name1, "h")));

         set-variable("prev",
                      preceding-sibling::*[1][
(local-name() = $name1 and get-class($name2) = "") or
                        (local-name() = "p" and get-class($name2) != "")]);
         if $prev {
             (: Two consecutive hi
                (or an hi just converted to bridgehead by this script
                followed by another hi)
                Do not create an empty section for the first one. :)
             headingToBridgehead();
...
---



--> To avoid this kind of problem, please do not use MS-Word styles specifying an outline level (e.g. EULA H2) for paragraphs which are not actual headings.

For example, something like EULA H2 should be reserved to actual level #2 headings.

"11.1. Disclaimer of Warranty. TO THE EXTENT PERMITTED BY APPLICABLE LAW, ACME Corp...." is NOT a level #2 heading.

"11.1. Disclaimer of Warranty." is a level #2 heading followed by paragraph "TO THE EXTENT PERMITTED BY APPLICABLE LAW, ACME Corp.".


--
XMLmind Word To XML Support List
w2x-support@xmlmind.com
http://www.xmlmind.com/mailman/listinfo/w2x-support

Reply via email to