paged.IDML Reference
Conditional text

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.

Tier: IntermediateIntermediateIIexplanation

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 Condition is a direct child of Document in the design map. It has a name, a Visible flag, and an indicator that marks its text on screen while editing. Named combinations of switches are saved as ConditionSets.
  • The tagged text. A CharacterStyleRange in a story carries AppliedConditions="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 sets: the elements and their spelling, including the typed properties InDesign requires.
  • Visibility: when a run prints, the multi-condition case, and what sets and indicators do.

In Paged: a run under a hidden condition is removed before layout, and 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.

On this page