Variable Reuse with Conkeyrefs

You reuse variables from variable warehouse topics with conkeyref attributes.

Overview

The following example shows that:
  • The “Variables Warehouse” topic is added to the deliverable “Map A” through the keydef element with the @keys attribute assigned.
    Important: Including variable warehouse topics through the keydef element with the @keys attribute assigned is necessary for the variable reuse mechanism to operate properly. By default, keydef elements are not included in the output.
  • “Variable A” is used in “Element A” in “Topic A”.
  • “Variable B” is used in “Element A” and in “Element D”. The elements are in different topics.
Reusing variables with conkeyrefs

Example

The following examples show the variable reuse mechanism through conkeyref attributes in Heretto CCMS. The Content Editor indicates reused variables with gray background.

Figure 1. Map A.

The following example shows a map that includes “Topic A”, “Topic B” and “Warehouse Topic”. The warehouse topic contains variables.

<map id="ditamap-7326" title="Map A">
    <topicref href="topic_a.dita"/>
    <topicref href="topic_b.dita"/>
    <keydef href="warehouse_topic.dita" keys="vars"/>
</map>
Conkeyref reuse - map structure
Figure 2. Variable Warehouse Topic.

The following example shows a warehouse topic that includes two variables.

Figure 3. Topic A.

The following example shows a topic that references two variables from the variable warehouse topic.

Conkeyref example
Figure 4. Topic B.

The following example shows a topic that references one variable from the variable warehouse topic.

Conkeyref example