Re: Can LwDITA MDITA format transclude "normal" dita content?

Radu Coravu

Hi Weiwu,

Your markdown file seems to be referenced like a lightweight DITA topic in the DITA Map:

<topicref href="intros/" format="mdita"/>

I'm attaching the LightWeight DITA equivalent topic that the DITA Open Toolkit publishing engine dynamically creates based on it.

If you open it in a DITA editing tool and validate it, there are about 4 problems with it:

1) The element <div> is not accepted in a Lightweight DITA topic. Only the following elements are allowed:

2) The @conref element is allowed only on these Lightweight DITA elements:

3) The @type element is not allowed on the <div> element.

4) When you conref in a DITA topic you need to conref to an equivalent DITA element from the target topic. So a DITA <div> may conref to another <div> located in another DITA topic, not to a <concept> element. Like in the example from the specification:

<!DOCTYPE html>
  <title>Low-Power Networking</title>   
  <article id="low-power">
    <h1>Low-Power Networking</h1> 
    <p>Your <span data-keyref="product-name" /> operates at a low level of networking power but can successfully connect at long distances because they can send information from light bulb to light bulb.</p>
<p data-conref="bulbs-to-groups.dita#bulbs-to-groups/assign-disclaimer" />
    <p id="disconnect-warning" class="note">Even in low power networks, be sure to disconnect all devices before performing maintenance tasks.</p>
there is an HTML <p> element pointing to a DITA <p> located in  "bulbs-to-groups.dita". The <p> would not be able to point to an entire <concept>.

Radu Coravu
Oxygen XML Editor
On 8/31/20 5:24 AM, Weiwu Zhang via wrote:

I thought the answer was yes, but then I have this in a MDITA file†:

   The issuer defines how each token is used or interpreted through the
   following negotiation methods:

   <div data-conref="../TokenNegotiation.dita#concept_jrl_h5q_4mb" type="dita" />

Which gives me this error:

   [conref] file:/home/a/DitaProjects/TokenScript-Documents/intros/ [DOTX010E][ERROR]: Unable to find target for conref="../TokenNegotiation.dita#concept_jrl_h5q_4mb".


1. Verified that the target "../TokenNegotiation.dita#concept_jrl_h5q_4mb" exists as a correct DITA 1.3 file. Source:

2. Verify that the source md works if without this offending line:

$ dita --input=Guides.ditamap --format=html5
(no error in output)

Which lead me to think maybe it's because conref doesn't work if the target is in DITA format while the reference happens in a md file†. Is it the case?


Weiwu Z.


Join to automatically receive all group messages.