Skriftlig Info ➜ DITA publishing ➜ DITA variables ➜ Inserting the topic map into the publication
DITA variables
Variable definitions using library topics
Variable definitions using topic maps
Prosedyrer
Defining a variable in a library topic
Inserting a variable from a library topic
Inserting the library topic into the publication
Defining a variable in a topic map
(This procedure is based on the Tridion Docs database repository and Oxygen XML editor. Other tools have similar functionality.)
You have all the tools available, and the necessary rights to develop new content. You have created one or more topic maps that define variables.
Each topic map with variable definitions is added to the bookmap using the <map> element. The <map> element must be inserted into the <frontmatter> element.
TipTo identify the topic map I use to define variables, and make it easier to find, I refer to it as a "keymap". This is not a standard DITA designation. In your database system, I suggest that you establish "Keymap" as a map type in your metadata. Unique identification makes the topic map easier to find. |
Insert the <map> element, and set the href attribute to specify the correct GUID.
<frontmatter> ... <map href="Definitions"></map> </frontmatter>
TipConsider building a modular system with variable definitions. This allows reuse of definitions and values, and provides a high degree of consistency. These pages only explain how variables are used in DITA publishing. If you want additional explanations about the principle of variables, see under Methodology and especially Using variables in the text. |
Tip: If you have created multiple topic maps using a modular approach, consider placing all these maps in one single topic map before you insert it into the bookmap. That makes it easier to maintain the definitions map when new modules are added or removed. The principle looks like this: <map id="Definitions"> <map href="Definition_Module1"></map> <map href="Definition_Module2"></map> <map href="Definition_Module3"></map> </map> |
All external links open in a new window. I take no responsibility for information on external websites, even if I have linked to them. Please report links that do not work.
The information on this page represents my personal opinions and my understanding of the topic being described. Feel free to link to the page, but do not copy large parts of the content without permission. I take no responsibility for any errors, misunderstandings or missing information. I also take no responsibility for any mistakes you may make or cause as a result of incorrect or missing information. You are welcome to contribute with comments, relevant experiences or additional information. See Editor and contact information.