DITA to markdown using chunk="to-content" does not maintain links to children topics

Post here questions and problems related to editing and publishing DITA content.
haole
Posts: 5
Joined: Wed May 17, 2023 12:23 pm

DITA to markdown using chunk="to-content" does not maintain links to children topics

Post by haole »

Hi,

I'm having a problem with DITA docs to markdown conversion. When I set chunk="to-content" on a parent topicref to produce a document with nested topics, the links pointing to the nested topics won't have id attribute at the end.

I'm using OxygenXML editor 25.1 with DITA-OT version 4.0.2.

Code: Select all

Concept1 map
- concept1.dita
	- task1.dita


Concept2 map
- concept2.dita
For example, concept2.dita contains a reference to task1.dita, but the link is generated as : [Task 1](../Concept1/concept1.md#). No topic id at the end.

Any guidance is appreciated. Thanks!

Edit: Attachment
Test dita.zip
(11.88 KiB) Downloaded 75 times
Last edited by haole on Mon May 22, 2023 8:54 am, edited 4 times in total.
Radu
Posts: 9051
Joined: Fri Jul 09, 2004 5:18 pm

Re: DITA to markdown using chunk="to-content" does not maintain links to children topics

Post by Radu »

Hi,

What version of Oxygen are you using and what version of the DITA OT publishing engine?
Can you create a small cut down valid sample DITA project exhibiting the problem and attach it to this thread?

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
haole
Posts: 5
Joined: Wed May 17, 2023 12:23 pm

Re: DITA to markdown using chunk="to-content" does not maintain links to children topics

Post by haole »

Radu wrote: Thu May 18, 2023 6:13 am Hi,

What version of Oxygen are you using and what version of the DITA OT publishing engine?
Can you create a small cut down valid sample DITA project exhibiting the problem and attach it to this thread?

Regards,
Radu
Hi Radu,

I updated the version info and attachment.
Radu
Posts: 9051
Joined: Fri Jul 09, 2004 5:18 pm

Re: DITA to markdown using chunk="to-content" does not maintain links to children topics

Post by Radu »

Hi,
Thanks for the sample.
So I have a download of DITA OT 4.0.2 and in the Oxygen Preferences->DITA page I refer to it as a default DITA OT engine.
Then I open your DITA Map in the Oxygen DITA Maps Manager view and publish it using the predefined "DITA Map Markdown" transformation scenario.
Then I look in the output folder at the "out/markdown/Concept2/Concept2.md" file and it looks like this:

Code: Select all

# Concept 2 {#concept-5353 .concept}
This is concept 2. [Task 1](../Concept1/Task_1.md) [Reference 1](../Concept1/Reference_1.md)
So I do not see that extra "#" in the reference.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
haole
Posts: 5
Joined: Wed May 17, 2023 12:23 pm

Re: DITA to markdown using chunk="to-content" does not maintain links to children topics

Post by haole »

Radu wrote: Thu May 18, 2023 2:19 pm Then I look in the output folder at the "out/markdown/Concept2/Concept2.md" file and it looks like this:

Code: Select all

# Concept 2 {#concept-5353 .concept}
This is concept 2. [Task 1](../Concept1/Task_1.md) [Reference 1](../Concept1/Reference_1.md)
Sorry, I sent the wrong attachment, the parent topicref for concept1_map.ditamap didn't have chunk="to-content". I updated the correct one. Basically, the Concept 1 should have a map as follows:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "map.dtd">
<map id="ditamap-4236" class="- map/map "><title class="- topic/title ">Concept1 map</title><topicref href="concept1.dita" class="- map/topicref " chunk="to-content">
        <topicref href="Task_1.dita" class="- map/topicref ">
            <topicref href="Reference_1.dita" class="- map/topicref "/>
        </topicref>
    </topicref></map>
Radu
Posts: 9051
Joined: Fri Jul 09, 2004 5:18 pm

Re: DITA to markdown using chunk="to-content" does not maintain links to children topics

Post by Radu »

Hi,

I can now reproduce the problem, I tried also with the latest DITA to markdown plugin version 5.4.0 and I can still reproduce the problem.
I see there is already a registered issue for it:
https://github.com/jelovirt/org.lwdita/issues/167
Was it added by you?

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
haole
Posts: 5
Joined: Wed May 17, 2023 12:23 pm

Re: DITA to markdown using chunk="to-content" does not maintain links to children topics

Post by haole »

Radu wrote: Wed May 24, 2023 9:04 am Was it added by you?
Yes, I'm trying to customize the lwdita plugin for a DITA to Docusaurus transformation, and it requires making references to sections (children topics).
Post Reply