Pulling navtitles via keyrefs: difference in behavior between Author view and DITA-OT HTML output
Posted: Fri Mar 17, 2017 1:42 am
Forgive me if this question may be simple, but our company only recently decided to go with DITA, and my path in this respect is just beginning. I tried googling, but my understanding of the terminology is still too limited to do it effectively.
I've come across a problem that I can't seem to be able to find an explanation for. It's a difference of behavior between Oxygen's Author mode output, and a generated HTML output (both from Oxygen and manually from DITA-OT).
To avoid inconsistencies in later translation and to manage file locations easily, I use keyrefs extensively in the following fashion (this is of course a simplification):
As you can see, I want to avoid having to explicitly provide names of uicontrol and wintitle elements, and instead pull them from navtitles every time. The definitions in the ditamap are:
And the files themselves:
In the Author view in Oxygen everything is perfect. Names are pulled from navtitles and displayed. There are no errors or warnings when performing any verification. So I get:
Your help would be greatly appreciated. I reckon I could of course try and get our developers to help me out and change the XSLT used for transformation, but I would think this shouldn't require a hack...
I've come across a problem that I can't seem to be able to find an explanation for. It's a difference of behavior between Oxygen's Author mode output, and a generated HTML output (both from Oxygen and manually from DITA-OT).
To avoid inconsistencies in later translation and to manage file locations easily, I use keyrefs extensively in the following fashion (this is of course a simplification):
Code: Select all
=== cut ===
file1.dita
...
Press the <uicontrol keyref="button_submit"/> button to open the <wintitle keyref="window_explosion> window.
=== cut ===
Code: Select all
=== cut ===
map.ditamap
<keydef format="dita" href="buttons/submit.dita" keys="button_submit" processing-role="normal" type="topic"/>
<keydef format="dita" href="windows/explosion.dita" keys="window_explosion" processing-role="normal" type="topic"/>
=== cut ===
Code: Select all
=== cut ===
submit.dita
...
<title>Submit button<title>
...
<navtitle>Submit</navtitle>
<searchtitle>Submit (button)</searchtitle>
=== cut ===
However, in resulting HTML, I get:Press the [button_submit]Submit button to open the [window_explosion]Explosion window.
whilst of course I would be expecting to get:Press the button to open the window.
Why? Is it something I'm doing wrong? Do I have to provide the navtitle in keydef itself? Can't it be pulled from the topic file? I would definitely rather avoid it due to translation and consistency reasons. We sometimes change labels in our software and I would then have to make sure the label is changed everywhere in every case, instead of just changing it in one location.Press the Submit button to open the Explosion window.
Your help would be greatly appreciated. I reckon I could of course try and get our developers to help me out and change the XSLT used for transformation, but I would think this shouldn't require a hack...