variables and entities
Forum topic: Submitted by ngn_at_ebbr on Thu, 2009-03-26 12:17.
So ... in FrameMaker, I'm happy to replace things like product names and department names by variables; saves typing, increases accuracy and so on. How do I set about applying the same approach in DITA? for the time being, I'm working with a DITA-aware editor (XMLMind) to get a clearer idea of how things fit together.
Thanks, Yves! I'll certainly
Thanks, Yves! I'll certainly bear that in mind.
Variables in a conref library
Hi Niels ;-)
Like Eliot said: conrefs are the way to go. Just put your "variables" in a "conref library" file (a simple DITA topic) and conref them to your heart's content.
With DITA-FMx, you can even use variables in FrameMaker and they will be rebuilt when you generate a FM book from your ditamap. This is taken from the DITA-FMx Help:
"Before running the Generate Book from Map command, run the Prepare Variables command on all files that contain FrameMaker variables. This wraps each variable in a ph element and assigns the variable name to the keyref attribute using the format “fmvar:VARNAME” (where VARNAME is the name of the variable). After conversion to a book and chapter files, you can run the Rebuild Variables command to rebuild live variables from the data stored in the ph elements."
If you want to see DITA-FMx at work, just let me know. I'll be happy to come and give you a DITA update at Brussels Airport.
Regards
Yves Barbion
Scripto
Belgium
"Variables" In DITA
In DITA, there are two basic ways to get the effect of "variables"
Note that in DITA 1.2 the keyref feature will provide a third way to do this, which is to define the "variable" as a keyed topicref that simply contains the text (rather than pointing to another element). In addition, you'll be able to use keys for conref.
These two features will let you have map-specific bindings of keys to values, e.g., to get a different product name for reference to the key "prodname" or whatever.
Note that you should never, under any circumstances, ever use XML entities in DITA content. Never. Ever.
Excellent response -
Excellent response - thanks! Navigable links aren't necessary for the case that prompted my question, but it's good to have that extra tip.
The complete absence of allusions to XML entities anywhere I'd looked had already made me suspect there could be a different mechanism involved.