On 6/17/24 10:58, Marc HISETTE wrote:

I’ve found a bug when your renderer process a “fo” file to get “docx” format.

Indeed, when we have a first item label such as “a)” other labels are not take in charge it seems that the renderer produces others automatically?

That's right. XFC automatically tries to infer the numbering style from the label of the first list item. Both bulleted and numbered lists are supported. Nested lists are supported. See https://www.xmlmind.com/foconverter/_distrib/doc/user/implementation.html#lists

Therefore the issue you have unfortunately corresponds to XFC default behavior.





In attachment I give you two fo files:

  * eli-etat-leg-rgd-2000-12-22-n5-jo-fr-fodocx_KO.fo : this one does
    not output items labels inside the fo:list-item-label elements.

OK.




  * eli-etat-leg-rgd-2000-12-22-n5-jo-fr-fodocx_OK.fo : this one outputs
    items labels inside the fo:list-item-label elements. In fact I’ve
    added a white-space empty character ​ to produce correctly
    the output.

Yes, you have indeed found a clever way to circumvent XFC default behavior.

However if you don't want XFC to infer the numbering style from the label of the first list item, we recommend to use either:

* Extension attribute xfc:label-format="" on a <fo:list-block>, where xmlns:xfc="http://www.xmlmind.com/foconverter/xsl/extensions";. See "4.2.1. The xfc:label-format extension attribute", https://www.xmlmind.com/foconverter/_distrib/doc/user/implementation.html#xfc_label-format

or:

* Command-line option: -detectLists=false. See https://www.xmlmind.com/foconverter/_distrib/doc/user/command_line_java.html

For example,

fo2docx -detectLists=false eli-etat-leg-rgd-2000-12-22-n5-jo-fr-fodocx_KO.fo out.docx

will give you the expected result.







--
XMLmind FO Converter Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xfc-support

Reply via email to