Page 1 of 1

GIT Submodules and Keyref

Posted: Tue Nov 04, 2025 4:07 pm
by Sue
We have multiple repositories for our various products. One map in one repository uses Key Definitions where different output scenarios are created to print different outputs based on the Key Definitions.

I have created a GIT submodule in another repository and uses the above map to add the content from the above map.

How does it decide which Keyref output is used? Is it the first one on top in the list?

Is there a way I can specify which one to use?

Re: GIT Submodules and Keyref

Posted: Tue Nov 04, 2025 4:33 pm
by Radu
Hi,
I'm afraid I do not quite understand.
So:
One map in one repository uses Key Definitions where different output scenarios are created to print different outputs based on the Key Definitions.
Publishing is done on a top level DITA Map which probably has submaps containing key definitions. What do you mean by "different outputs based on the Key Definitions"? Do you also use profiling/filters?
I have created a GIT submodule in another repository and uses the above map to add the content from the above map.
How does that Git submodule use the top level DITA Map? Does it define another DITA Map which refers to it?
How does it decide which Keyref output is used? Is it the first one on top in the list?
I do not understand what you mean by "Keyref output ". If in a DITA Map there are multiple topicrefs all with the same key definition name, the first topicref is taken into account.

Re: GIT Submodules and Keyref

Posted: Tue Nov 04, 2025 5:49 pm
by Sue
Publishing is done on a top level DITA Map which probably has submaps containing key definitions. What do you mean by "different outputs based on the Key Definitions"? Do you also use profiling/filters? - yes, I use profiling filters.

How does that Git submodule use the top level DITA Map? Does it define another DITA Map which refers to it? - The top level dita map (X) calls another map (Y) of which the topics are in the sub module.

I do not understand what you mean by "Keyref output ". If in a DITA Map there are multiple topicrefs all with the same key definition name, the first topicref is taken into account. - Y uses key definitions (A and B) and profiling attributes. So, when I need to publish the X and include content I have to ensure the Key definition that uses A is listed first? No other way to define which one to use? This is my question.

Re: GIT Submodules and Keyref

Posted: Wed Nov 05, 2025 8:09 am
by Radu
Hi,

About your question:
Y uses key definitions (A and B) and profiling attributes. So, when I need to publish the X and include content I have to ensure the Key definition that uses A is listed first? No other way to define which one to use? This is my question.
Here's an example of what we do with the Oxygen user's manual:
https://github.com/oxygenxml/userguide/ ... fs.ditamap

We define the key "product" multiple times but each time with a different "product" profiling attribute:

Code: Select all

<keydef keys="product" product="editorEclipse">
    <topicmeta>
      <keywords>
        <keyword>Oxygen XML Editor Eclipse plugin</keyword>
      </keywords>
    </topicmeta>
  </keydef>
  <keydef keys="product" product="author">
    <topicmeta>
      <keywords>
        <keyword>Oxygen XML Author</keyword>
      </keywords>
    </topicmeta>
  </keydef>
Whenever we want to publish for example the user's guide for "Oxygen XML Author", we publish it with a profiling filter which excludes any other profiling attribute than "author". So in this case not the first "product" key wins but the one which is left behind after the profiling was applied.

Regards,
Radu