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

Having trouble installing <oXygen/>? Got a bug to report? Post it all here.
Carl
Posts: 53
Joined: Fri Oct 19, 2018 2:19 am

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

Post by Carl » Sat Nov 24, 2018 1:26 am

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.

Radu
Posts: 6507
Joined: Fri Jul 09, 2004 5:18 pm

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

Post by Radu » Mon Nov 26, 2018 11:38 am

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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Carl
Posts: 53
Joined: Fri Oct 19, 2018 2:19 am

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

Post by Carl » Wed Nov 28, 2018 10:03 pm

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

Radu
Posts: 6507
Joined: Fri Jul 09, 2004 5:18 pm

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

Post by Radu » Thu Nov 29, 2018 8:56 am

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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Carl
Posts: 53
Joined: Fri Oct 19, 2018 2:19 am

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

Post by Carl » Fri Mar 08, 2019 12:53 am

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

Carl
Posts: 53
Joined: Fri Oct 19, 2018 2:19 am

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

Post by Carl » Mon Mar 11, 2019 7:23 pm

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

Post Reply