Page 1 of 1

A keyref in a conref/conkeyref pushed element

Posted: Wed Sep 25, 2013 5:24 pm
by colinm
Hello there,

In the frame of this project on Github (https://github.com/ColinMaudry/dita-product-cascading), I am trying to make the best out of the reuse and referencing mechanisms included in DITA 1.2.

So far I didn’t have any trouble, but I think I’ve hit a bone.

I’m trying to push an element that contains a key reference to a keyword, using the conkeyref push method.

The element gets pushed, the key is resolved in the source topic, but not in the target. Here is the markup:

Map.ditamap

Code: Select all


<map id="ds_doc" rev="0.5">
<title>My map</title>
<keydef keys="bla">
<topicmeta>
<keywords>
<keyword>KEY</keyword>
</keywords>
</topicmeta>
</keydef>
<topicref href="source.dita" processing-role="normal" format="dita"/>
<topicref href="target.dita" keys="target" format="dita"/>
</map>
----------------------------------------------
source.dita

Code: Select all

<topic id="source">
<title>Source</title>
<body>
<p conaction="pushbefore">This is the conref pushed content, with a <keyword keyref="bla"/></p>
<p conaction="mark" conkeyref="target/anchor"/>
</body>
</topic>
------------------------------------------------
target.dita

Code: Select all

<topic id="target">
<title>Target</title>
<body>
<section>
<title>I want my pushed content in there</title>
<p id="anchor"/>
</section>
<section>
<title>I want an equation image in there</title>
<image placement="break" href="../image.jpg" align="center"/>
</section>
</body>
</topic>
I have tried the following variations, with the same unsuccessful result (the element is pushed, the key is not resolved in the target topic):
- replacing conkeyref with conref
- using keyref on a xref element, with a reference to the “target” key

Is it specified somewhere that the conref push doesn’t support inner key references, is it a DITA OT limitation or am I doing something wrong?

I use the DITA OT bundled in Oxygen XML 15.0, v 1.7.2. I have used the default PDF and XHTML pipelines.

I also posted this issue on the dita-users list, I will keep both threads in sync.

Thanks,

Colin Maudry

Re: A keyref in a conref/conkeyref pushed element

Posted: Wed Sep 25, 2013 5:39 pm
by colinm
The actual files to reproduce the issue are in the branch key-issue of the Github repo, in the folder flat_structure.

Re: A keyref in a conref/conkeyref pushed element

Posted: Thu Sep 26, 2013 12:10 pm
by Radu
Hi Colin,

I reproduced the issue and it looks like a bug to me, I added it here:

https://github.com/dita-ot/dita-ot/issues/1572

If I find something in the code which might cause the problem, I will update the opened issue so you can watch it.

Regards,
Radu

Re: A keyref in a conref/conkeyref pushed element

Posted: Thu Sep 26, 2013 1:43 pm
by colinm
Thanks Radu! Fixing this bug could enable very nice mechanisms to produce technical documentation.

I found a similar one: If an element A is pushed inside a block/element B that is also conref pushed to somewhere, element B is pushed but element A is not pushed to element together with element B.

Shall I create a topic so that you double check it, or shall I report it directly to the DITA OT project?

Re: A keyref in a conref/conkeyref pushed element

Posted: Thu Sep 26, 2013 2:16 pm
by Radu
Hi Colin,

I think this is also a bug, I am not sure of it because I did not see in the specification exactly what should be done in this case, maybe you can post this on the DITA Users List, maybe Eliot Kimber has a better idea of what the behavior should be.
Probably conref pulling and conref pushing should behave similarly and expand content recursively.

Regards,
Radu

Re: A keyref in a conref/conkeyref pushed element

Posted: Thu Sep 26, 2013 5:33 pm
by colinm
Reply from Robert Anderson here :
https://github.com/dita-ot/dita-ot/issues/1573
I'm sure this case was never considered when writing up the OASIS DITA specification, which is why it is not addressed. The specification explicitly does not specify a processing order for resolving independent "push" actions, which is why it declares that there is no specified order for 2 elements pushed before / after the same target.

This example also raises the thought of circular references, which were not considered by the specification but would also be difficult to manage.

Re: A keyref in a conref/conkeyref pushed element

Posted: Thu Sep 26, 2013 5:34 pm
by colinm
Sorry, I forgot to mention Robert's message refers to nesting conref push, not to the original topic.