Page 1 of 1

My reuse string files are not resolvable outside of the root map

Posted: Sat Nov 24, 2018 1:26 am
by Carl
We maintain several .xml files containing strings that are used frequently, for example: our product name, our company name. We've placed these string files in its own directory and they are referenced their own ditamap. We reference them using a conkeyref like this:

<ph conkeyref="strings-prods/product-name"/>

Now, when I build the entire manual using a transformation, the reuse strings like "product-name" get pulled in correctly. But when I try to generate only a single chapter (i.e., an individual ditamap within the project), the reuse strings are not found. I get errors like this:
[DOTJ046E] Conkeyref="strings-prods/product-name" can not be resolved because it does not contain a key or the key is not defined. The build will use the conref attribute for fallback, if one exists.
As a result, my string is replaced by a blank space in the transformed output.

How do I resolve this so that these reuse strings are available everywhere? I cannot understand the error message and your documentation is not helpful.

Re: My reuse string files are not resolvable outside of the root map

Posted: Mon Nov 26, 2018 11:38 am
by Radu
Hi Carl,

The publishing engine used by Oxygen gathers the keys starting from the DITA Map that you are publishing. There is an issue registered for it:

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

So even though you may set the "Root Map" combo box in Oxygen to point to the master DITA Map, the publishing engine will ignore that setting. So if you want to publish just a chapter, you will probably need to either refer from the chapter DITA Map the DITA Map which defines the keys or create another DITA Map which refers the chapter dita map and the keys DITA Map and publish that. Or you could add in the main DITA Map some profiling conditions on all chapter references so that you may be able to publish the main DITA Map with only one chapter showing.

Regards,
Radu

Re: My reuse string files are not resolvable outside of the root map

Posted: Wed Nov 28, 2018 10:03 pm
by Carl
This is unfortunate. Is this a defect that will be resolved?

And can you tell me how to do this?
refer from the chapter DITA Map the DITA Map which defines the keys
Thanks.
Carl

Re: My reuse string files are not resolvable outside of the root map

Posted: Thu Nov 29, 2018 8:56 am
by Radu
Hi Carl,

So:
This is unfortunate. Is this a defect that will be resolved?
This is not a defect, we added the "Root Map" setting in the Oxygen DITA Maps Manager mostly for editing, in order to have key references properly resolved when editing topics.
But it is a possible improvement direction, we do not control the DITA Open Toolkit publishing engine's future improvements list but when it will be done Oxygen will be able to use the Root Map information and pass it to the publishing engine.
And can you tell me how to do this?
refer from the chapter DITA Map the DITA Map which defines the keys
Just add a <topicref> to the key definitions map with "format="ditamap"" and "processing-role='resource-only'".

Regards,
Radu

Re: My reuse string files are not resolvable outside of the root map

Posted: Fri Mar 08, 2019 12:53 am
by Carl
Hi Radu.

I'm just going through my old posts and I realized that I never tried your suggestion above. I just did my own workaround of importing the topic I want into a separate small temporary project.

Anyhow, I've tried inserting a topicref to the key definitions map as you suggested, but my reuse variables are still not recognized.

I will email you a screenshot showing what I've done.

Any ideas?

Thanks.
Carl

Re: My reuse string files are not resolvable outside of the root map

Posted: Mon Mar 11, 2019 7:23 pm
by Carl
Hi Radu. I tried your suggestion that you emailed me and it seems to have fixed the problem! Setting fix.external.refs.com.oxygenxml to 'true' worked.

Thanks.
Carl