Topics

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".

Troubleshooting:

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?

Thanks!

Weiwu Z.

https://github.com/AlphaWallet/TokenScript-Documents/blob/intro-articles/intros/token-negotiation.md


Radu Coravu
 

Hi Weiwu,

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:

http://docs.oasis-open.org/dita/LwDITA/v1.0/cnprd01/LwDITA-v1.0-cnprd01.html#concept_ig4_cfb_dy

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

http://docs.oasis-open.org/dita/LwDITA/v1.0/cnprd01/LwDITA-v1.0-cnprd01.html#ariaid-title15

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>
<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>
  </article>
</html>
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>.

Regards,
Radu
Radu Coravu
Oxygen XML Editor
On 8/31/20 5:24 AM, Weiwu Zhang via groups.io 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/token-negotiation.md:578:34: [DOTX010E][ERROR]: Unable to find target for conref="../TokenNegotiation.dita#concept_jrl_h5q_4mb".

Troubleshooting:

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?

Thanks!

Weiwu Z.

https://github.com/AlphaWallet/TokenScript-Documents/blob/intro-articles/intros/token-negotiation.md





  


Weiwu Zhang
 

On Mon, 31 Aug 2020, Radu Coravu wrote:

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.
Thanks 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).

Regards
Weiwu Z.