jelovirt/org.lwdita

keys do not resolve

darrenn-jackson opened this issue · 2 comments

Neither the "old" (current?) syntax of [key-id], nor the newer <span data-keyref="key-id"/> syntaxes result in resolved keys in output generated from MDITA files when a key is defined in the parent map. [key-id] gets becomes <span data-keyref="key-id"/> in DITA and <span data-keyref="key-id"/> becomes <xref keyref="key-id"/> in DITA (dita transtype). The key text doesn't get substituted when transforming to HTML5.

I'm running DITA-OT version 4.0.2 with version 5.10 of the lwdita plugin.

Could you attach a small test case that reproduces the issue?

There is not LwDITA plug-in version 5.10. I assume you mean 5.1.0?

You are correct, I have 5.1.0 of the plug-in.

It turns out that I didn't have the topic that contains the keyref in the map. I didn't catch this before because the normalized DITA file (with the unresolved keys) ended up in the output directory anyway. The missing file is a link target from another file that was included in the map, so I think that's why DITA-OT found it and passed it though to the output directory.

Once I added it, the current [key-id] syntax resolved as <xref keyref="key-id"><keyword>KEY_VALUE</keyword></xref> and the newer syntax proposed by the draft spec resolved as <ph keyref="key-id">KEY_VALUE</ph>. That was for transforming to normalized DITA.

When transforming to HTML5, the key value text gets substituted exactly as expected for both syntaxes.