Skriftlig Info ➜ DITA publishing ➜ DITA variables ➜ Create variables in modules
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
My guess is that your publications are not to different from mine. This means that your variables can be sorted by application. Some are unique to a particular publication. Others are generic for a product, a product group or the manufacturing company, while some are generic for other reasons.
If you choose to create all your variables in one object (map or library) you will only need to import one single object into your publication. That's nice and easy. However, that will make you vulnerable for changes to the generic values. You will also need to translate the values over and over again, even though they are identical.
I have chosen a modular approach. I have created a limited number of generic objects, and I use these over and over again in multiple publications. This allows me to reuse already translated objects. It also offers a high degree of consistency.
One of the variables I use is "Month". I only have 12 possible values, so I have 12 library topics defining these values. I can use of these in every single publication I make.
I also have one variable that define the "ProductType". I do not have so many values to choose from here, so I have one library topic for each product type. Every time I make a publication for "Fish-finding sonar" I use the same library. This offers consistency, as I have seen that this particular term has been translated differently depending on which translator I have used.
The "ProductName" is also defined in a variable. This means that I can use the same library topic for every publication for this specific product.
This leaves me with only a very few varibales that are unique for each publication. The publication's "DocumentNumber" is one of these, the related "SW-Version" is another.
As you can imagine, I always need to import multiple library topics into my publication. I admit that this is a bit more "complicated" than inserting only one. Nevertheless, after weighing the "pros and cons" I have concluded that I save both time and money. I also achieve the desired degree of consistency.
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.