IDML Reference
Conditional text
How one IDML document carries several versions of its text — named conditions in the design map, runs that name them, and when their text is left out.
Reviewed against engine v0.71.9
Conditional text keeps several versions of a document's words in one file and prints only the versions whose conditions are switched on.
In short A phrase, a sentence or a whole paragraph can be tagged with a named
condition: a draft note that never reaches print, a price that differs between
regions, an answer key hidden from the student edition. The conditions are Condition
elements in designmap.xml, each with a Visible flag. A run of text names the
conditions that govern it in the AppliedConditions attribute of its
CharacterStyleRange. Text whose condition is hidden stays in the story but is left out
of the page.
The two halves
- The switch. A
Conditionis a direct child ofDocumentin the design map. It has a name, aVisibleflag, and an indicator that marks its text on screen while editing. Named combinations of switches are saved asConditionSets. - The tagged text. A
CharacterStyleRangein a story carriesAppliedConditions="Condition/Draft", or several ids separated by spaces. The run is the unit that is shown or hidden, the same range that carries its font and colour (see story structure).
Hidden text is not just painted out: it is left out of composition, so the visible text closes up around it. A run under one hidden condition is hidden; a run under several conditions prints while any one of them is visible.
Where to go next
- Conditions and condition setsProIII· referencethe elements and their spelling, including the typed properties InDesign requires.
- VisibilityProIII· explanationwhen a run prints, the multi-condition case, and what sets and indicators do.
In Paged: a run whose conditions are all hidden is removed before layout; one visible condition keeps it, as in InDesign. Conditions are saved back in InDesign's spelling.
Supported · verified
Frequently asked questions
What is conditional text in IDML? Text tagged with one or more named conditions, so that one file can hold several versions of a document. Text whose condition is hidden does not print.
Where are conditions defined?
In designmap.xml, as direct children of Document. A run names them in the
AppliedConditions attribute of its CharacterStyleRange.
Is hidden conditional text deleted from the file? No. It stays in the story; only the printed page leaves it out.
Can a run have more than one condition?
Yes, as a space-separated list in AppliedConditions. How a mix of visible and hidden
conditions resolves is covered in visibility.
Text variables
IDML text variables and page markers — the TextVariable definition, its VariableType kinds, TextVariableInstance in a story, and the <?ACE?> page-number codes.
Conditions and condition sets
The Condition and ConditionSet elements in designmap.xml, AppliedConditions on a run, and ConditionalTextPreference — spelled the way InDesign reads them.