Re: [oXygen-user] [OXYGEN-12915] Customizing Batch Document conversion from Word to DITA

Hi, I'm sorry, but currently, the add-on does not support setting an additional XSLT processing file. We do have an internal issue logged for this and I've added your feedback to it to help prioritize it. As you suggested, the only workaround at the moment is to post-process the resulting DITA documents using a custom refactoring operation, like in this example: https://blog.oxygenxml.com/topics/migrating_word_to_dita_bdc/frequently_aske... Regarding the issue with the image being outside the fig element, I was unable to replicate this problem. The resulting DITA document should look like this: <fig id="figureID-figure_flower"> <title>Figure Flower</title> <image href="media-image/image1.jpg"> <alt>A white flower with yellow center.</alt> </image> </fig> Could you please provide us with a sample where this problem occurs? Best regards, Cosmin -- Cosmin Duna Oxygen XML Editor On 12-Feb-24 4:14 PM, Jirka Kosek wrote:
Hi,
we are using Batch Document converting Add-on on one project to convert Word files into DITA content. I'm wondering if there is any way how to customize conversion process in a more complex way than just by mapping Word styles into HTML elements that are later mapped into DITA (as described at https://www.oxygenxml.com/doc/versions/26.0/ug-editor/topics/batch-converter...).
Examples of things we would like to customize:
* Grouping of generated DITA elements. For example Word figure with caption is by default converted to two paragraphs -- one with image and the second with caption. We can map Caption style to "figure > figcaption" but this will generate DITA figure only with title, image itself will be in the previous paragraph. If we could run simple XSLT on the result it should be possible to automatically fix such output to create valid and more semantically rich DITA.
* We need to create DITA Bookmap not plain DITA Map from one Word file. So having ability to run custom XSLT that woudl transform map into bookmap would help us a lot.
Of course we can implement this as an additional post-processing step but if there is some existing integration point I've missed it would be much easier for users just to invoke conversion from the menu.
Many thanks in advance,
Jirka
_______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com https://www.oxygenxml.com/mailman/listinfo/oxygen-user

On 14.02.2024 14:06, Oxygen XML Editor Support (Cosmin Duna) wrote:
I'm sorry, but currently, the add-on does not support setting an additional XSLT processing file. We do have an internal issue logged for this and I've added your feedback to it to help prioritize it.
Thanks.
Regarding the issue with the image being outside the fig element, I was unable to replicate this problem. The resulting DITA document should look like this: <fig id="figureID-figure_flower"> <title>Figure Flower</title> <image href="media-image/image1.jpg"> <alt>A white flower with yellow center.</alt> </image> </fig> Could you please provide us with a sample where this problem occurs?
Unfortunatelly I can't provide document from the customer. But I think I have tracked down the issue. It seems that this works only if the image caption in a Word file is not numbered or contains just figure number. But if figures in Word are using composite numbers like Chapter-Figure number than conversion doesn't detects this as a figure. So in Word terms if paragraph with caption contains just one field like: { SEQ Figure \* ARABIC \s 1 } then proper figure is generated in DITA. However if composite number is used in caption and there are two fields like { STYLEREF 1 \s } { SEQ Table \* ARABIC \s 1 } then conversion doesn't recognize this as a caption belonging to an adjacent image and no figure is generated. -- ------------------------------------------------------------------ Jirka Kosek e-mail: jirka@kosek.cz http://xmlguru.cz ------------------------------------------------------------------ Professional XML and Web consulting and training services DocBook/DITA customization, custom XSLT/XSL-FO document processing ------------------------------------------------------------------ Bringing you XML Prague conference http://xmlprague.cz ------------------------------------------------------------------
participants (2)
-
Jirka Kosek
-
Oxygen XML Editor Support (Cosmin Duna)