Variable Reuse with Keyrefs
You can reuse variables from variable warehouse maps with keyref attributes.
Overview
- The “Warehouse Map” is added to the deliverable “Map A” through
the mapref element with the
@processing-role="resource-only"
attribute assigned. - “Variable A” is used in “Element A” in “Topic A”.
- “Variable B” is used in “Element A” and in the “Element D”. The elements are in different topics.
Example
The following example shows the variable reuse mechanism through keyref attributes in easyDITA. The topic editor indicates reused variables with gray background.
- The “companyName” variable is used in “Topic A”
- The “productName” variable is used in “Topic A” and “Topic B”
- The variables are reused from “Variable Warehouse Map” through keyref attributes and keyword elements
Create a Variable Warehouse Map
Create a variable warehouse map that contains variables for product names, interface names, etc.
Add Variable Warehouse Maps to Deliverable Maps
Add a variable warehouse map to a deliverable map to enable variable reuse through keyword elements and keyref attributes.
Reuse Variables through Keyrefs
You reuse variables from the variable warehouse maps through keyword elements and keyref attributes.