xref to keyref with keyscope

Post here questions and problems related to editing and publishing DITA content.
ann.jensen
Posts: 295
Joined: Wed Jun 17, 2015 10:19 am

xref to keyref with keyscope

Post by ann.jensen »

Hi,
I am using keyscopes to generate 2 instances of a single topic for 2 different products (each in a separate map).
I want to link to each of these instances from another topic. I have set up key definitions in each map to reference each instance via its relevant keyscope.
When I publish to webhelp my links are not generating as I would expect.
I will send on a sample project to support@oxygenxml.com.
Thanks,
Ann
Radu
Posts: 9055
Joined: Fri Jul 09, 2004 5:18 pm

Re: xref to keyref with keyscope

Post by Radu »

Hi Ann,

Thanks for the samples.
I'm not sure exactly what you expected for the output.
Looking at the linking.dita, it refers to two keys, each one from a different key scope like:

Code: Select all

 <p>Links <xref keyref="product1_scope.archiving"
/> to <xref keyref="product2_scope.archiving"
/>.</p>
Looking at where the "archiving" key is defined in the second key scope "product2_scope":

Code: Select all

<keydef keys="archiving" href="../product1/c_archiving_mod.dita"/>
it seems to point to a topic which is referenced only in the first key scope (so the product name in that topic is product1(, so that second link in my opinion is properly resolved.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
ann.jensen
Posts: 295
Joined: Wed Jun 17, 2015 10:19 am

Re: xref to keyref with keyscope

Post by ann.jensen »

Hi Radu,
So what I expected/hoped for was that

Code: Select all

<p>Links <xref keyref="product1_scope.archiving"
/> to <xref keyref="product2_scope.archiving"
/>.</p>
would result in the following:
Links Archiving - Product 1 to Archiving - Product 2.
I expected this since:
- the archiving key is defined in both product1_scope and product2_scope.
- both products have references to the topic c_archiving_mod.dita.

But both xrefs are resolving to Archiving - Product 1 and I don't understand why.
Any advice appreciated,
Regards,
Ann
Radu
Posts: 9055
Joined: Fri Jul 09, 2004 5:18 pm

Re: xref to keyref with keyscope

Post by Radu »

Hi Ann,

I created a very simple example based on your project and added a DITA OT issue here:

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

I will try to get some feedback from the DITA OT developers, so you can log in to GitHub and watch the issue if you want to see our conversation there. Your example is more complex than the samples I added to the issue but hopefully if the issue is fixed, your example should work as well.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply