Can LwDITA MDITA format transclude "normal" dita content?
Weiwu Zhang <weiwu.zhang@...>
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/token-negotiation.md:578:34: [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: https://github.com/AlphaWallet/TokenScript-Documents/blob/intro-articles/TokenNegotiation.dita
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?
Your markdown file seems to be referenced like a lightweight DITA topic in the DITA Map:
<topicref href="intros/token-negotiation.md" 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:
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 groups.io wrote:
On Mon, 31 Aug 2020, Radu Coravu wrote:
If you open it in a DITA editing tool and validate it, there are about 4Thanks Radu. Having fixed all 4 problems now the document works!
changing the element to <section>, now conref from a <section> to a <section> and dropped @type (as referring to XDITA doesn't require specifying type).