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.