GIT Submodules and Keyref

Post here questions and problems related to editing and publishing DITA content.
Sue
Posts: 3
Joined: Mon May 23, 2022 12:35 pm

GIT Submodules and Keyref

Post 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?
Radu
Posts: 9556
Joined: Fri Jul 09, 2004 5:18 pm

Re: GIT Submodules and Keyref

Post 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.
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Sue
Posts: 3
Joined: Mon May 23, 2022 12:35 pm

Re: GIT Submodules and Keyref

Post 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.
Radu
Posts: 9556
Joined: Fri Jul 09, 2004 5:18 pm

Re: GIT Submodules and Keyref

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