FrameMaker 8 includes two powerful new features to help you manage single-sourced content. You can now combine conditional text tags with Boolean logic (AND, OR, NOT) to create complex conditional statements. In structured FrameMaker, you can show and hide information based on complex combinations of attribute values.
In order to make the most of this article, you need the following software:
Basic FrameMaker knowledge
The conditional text feature in FrameMaker is used in almost every single-sourcing workflow. By flagging information as belonging to a specific version of a document, you can deliver two, three, or more versions of the content from a single file. Common examples of this approach include versioning print-only/online-only and Windows/Mac/UNIX variants.
But you quickly run into problems when you attempt to conditionalize information across two or more dimensions. For example, if you wanted to version by output type (print/online) and by platform (Windows/Mac/UNIX) in FrameMaker 7, you needed the following 11 conditions (see Table 1):
| Windows | Mac | UNIX | All | |
|---|---|---|---|---|
| 1 | 2 | 3 | 4 | |
| Online | 5 | 6 | 7 | 8 |
| All | 9 | 10 | 11 |
Table 1. The 11 conditions that you need to version by output type and platform in FrameMaker 7
The rabbit-like condition tags were required because of a limitation in previous versions of FrameMaker: conditional text intersections were always treated as OR conditions. For example, if you label some information as print-only and also as Windows-only, displaying either the print or the Windows condition would result in the information being displayed as shown in Figure 1.

Figure 1. Conditional text display in FrameMaker 7 can be difficult to manage when conditions intersect.
To work around this issue, you would create "combined conditions," such as PrintWindows or OnlineMac.
FrameMaker 8 now supports this approach with a new complex conditional text feature. The Show/Hide Conditional Text dialog box has a new section that lets you build complex Boolean expressions to control how conditions are shown and hidden (see Figures 2 and 3).

Figure 2. The Show/Hide Conditional Text dialog box enables you to build complex Boolean expressions.
For example, suppose you want to display content for your printed Windows output. You need to exclude online content and the various non-Windows platforms, so you write the expression NOT "Online" AND "Windows" (see Figure 3).

Figure 3. The Build Expression dialog box helps you construct Boolean expressions.
Note that you cannot use the expression "Print" AND "Windows" because that excludes information that is Windows-specific (has the Windows condition) but not target-specific (does not have either Print or Online applied).
If you are working in structured FrameMaker, you can also take advantage of the new attribute-based condition support (see Figure 4). In previous versions, this required third-party software.

Figure 4. FrameMaker 8 lets you set up attribute expressions and save your expression for reuse later.
After you assign attribute values, you can show and hide information based on attribute values. For example, given the previous example, you could create a platform attribute with Windows, Mac, and/or UNIX as the potential values. You would also create a target attribute with print and online as the potential values. With these labels, you can then tell FrameMaker to display information only when the attribute values meet certain conditions (see Figure 5).

Figure 5. Clicking Edit in the Manage Attribute Expressions dialog box opens this expression builder for attribute expressions.
Notice that the logic for attributes is different from the logic for conditional tags. For conditions, specifying "Windows" AND "Print" as the conditional expression results in displaying unconditional information plus the information that has both conditions applied. For attributes, specifying (platform="win") AND (outputclass="print") results in the display of all content that:
The equivalent conditional text setting, shown in Figure 3, is NOT "Online" AND "Windows".
Figure 6 shows an example of structured content with outputclass and platform attributes.

Figure 6. The outputclass attribute lets you label content that is intended only for print or online output.
Applying the expression shown in Figure 5 filters out the <fig> element because its outputclass is "unix." The result is shown in Figure 7.

Figure 7. Filtering by attribute hides information.
Complex conditional processing opens up the possibility of "extreme versioning," the use of FrameMaker to create and deliver content with a huge number of possible versions.
Both conditional text tags and attribute values are preserved when you use structured FrameMaker to create XML. If you intend to do further processing on the XML content, I recommend that you use attributes.
FrameMaker now gives you powerful tools to control your conditional content. By far the most challenging part of a versioned workflow is planning your conditional tags or attributes. You may want to draw up a grid that shows the types of versioning you need to do to help you figure out how to implement the solution in FrameMaker.
Sarah O'Keefe is founder and president of Scriptorium Publishing Services, Inc., based in Research Triangle Park, North Carolina, USA. The company is focused on implementing tools and processes to optimize publishing workflows. Services include developing and deploying XML-based structured authoring environments, configuring authoring and publishing tools, providing technical training, and more.
Her publications include Publishing Fundamentals: FrameMaker 7, The WebWorks Publisher Cookbook, Technical Writing 101, FrameMaker for Dummies, and numerous white papers.