Compound uses of the <keydef> element
You can use keydefs to simultaneously define both file paths and text strings. Consider the case where you need to cross-reference a topic in many different places, but you want to use some text other than the topic title in the cross-reference. In this case, you can create a <keydef> element that associates a key with an href to the topic, but also uses the nested <topicmeta> to define a <linktext> element:
<keydef keys="initing_ddb" href="init_ddb.dita"> <topicmeta> <linktext>Initializing the Duck Database</linktext> </topicmeta> </keydef>
Key references with fall-backs
If you use both a keyref and an href attribute in an element, a DITA output generator will attempt to resolve the keyref first. If the key is not defined, the href target is used as a fall-back.