The key-reference mechanism in DITA provides a layer of abstraction
so that referenced content strings can be defined externally at the DITA map level instead of locally in each topic. Key references (keyrefs) are conceptually similar to content references (conrefs) in that they’re references that point to content that resides somewhere else. There are many possible implementations of key references in DITA. Currently in GIS we’re using keyrefs to define variables.
When you use DITA topics in different publications, there might be names of objects that should have different values, depending on the context. With keyrefs, you name the variables using the <keydef> element. For example, you might have a keydef for the name of a server that changes depending on the implementation When you insert a <keydef> element in a topic, it has no defined value—it’s just a placeholder reference. You define the <keydef> value in special key
DITA Maps. Each key map can contain different values for the <keydef> elements that you’ve defined. Then, depending on which key map you include in your bookmap, the value of the <keydef> is applied during production. You can change the value of the variable by using a different key maps in different bookmaps. Or you can include multiple key maps in single bookmap and apply conditions to them. You can then use the bookmap in different publications and select different conditions to achieve different values in the outputs.