Conditional Processing Attributes

The DITA conditional processing attributes enable you to profile topic and map elements. You can then include or exclude profiled content during publication by using DITAVALs.

Attributes and Values

You can assign any of the following default conditional processing attributes to topic and map elements:

  • audience attribute
  • platform attribute
  • product attribute
  • otherprops attribute (“otherprops” stands for “other properties”)
Note: If needed, we can configure conditional processing attribute specific to your organization. For more information, contact your Customer Success Manager.

By default, the conditional processing attributes can take any value. For example, you can set the platform attribute value to “Windows”, “macOS”, or anything else. The values are case-sensitive so, for example, “MacOS” is a different value than “macOS”, and in easyDITA you use a space to separate two values. We recommend using underscores if you need a single value but want to use multiple terms

Note: If you want to set default values for conditional processing attributes, do one of the following:
  • Set the attribute values by using a special kind of taxonomy. See Taxonomy-Driven Attributes.
  • Contact your Customer Success Manager.

Setting default values for conditional processing attributes ensures that every author profiles content in a consistent way.

Figure 1. Default Attribute Values.

The following example shows a list of default values set for the audience attribute.

Profiling Topic Elements

You can profile topic elements by using the Attributes tab.

Figure 2. Attributes Tab.

The list of attributes that shows is context-sensitive. By default, the list contains attributes that are available to apply to the element where your cursor is located.

Profiling Map Elements

You can profile map elements by using the Edit Properties window.

Figure 3. Edit Properties Window

Profile Topic Elements

Use the topic editor to conditionalize elements in a topic for conditional publishing.

The default conditional processing attributes are: audience, rev, platform, product, props, and otherprops.
  1. In the content library, open a topic and place your cursor in the element you want to set a conditional processing attribute values on.
    Note: It is a best practice to profile grammatically independent elements, not just individual words or phrases. This is especially important when localizing the content, since at least a complete sentence is required to provide sufficient context for accurate translation memory and machine translation matching. This is true even if some text is duplicated across alternative elements for different conditions. When localizing content, it's always best to think of it grammatically first, then structurally.
  2. Click Attributes to open the Attributes tab.
  3. Navigate to the conditional processing attribute that you want to define, for example audience.
  4. Enter the values for each conditional processing attribute that defines the condition in which the element will be shown.

    In the following example, we set the product field to ClassicToaster for one of the steps. This step item will be published only when Product=ClassicToaster and Action=Include in the DITAVal used at publish.

  5. Press the Enter keyboard key to apply attribute values.
Depending on the action defined for a specific value at publish time, content is either flagged, excluded, or included. If no action is specified for a specific value, the default is to include the content (unless your publishing profile sets the default to exclude).

Profile Map Elements

Use the map editor to set conditional processing attribute values and conditionalize an entire topic (topicref element) or a submap (mapref element) for conditional publishing.

The default conditional processing attributes are: audience, rev, platform, product, props, and otherprops.
Note: When you apply a conditional processing attribute to a 'parent' topic (topicref element), the same attribute applies to all children of that topic.
  1. In the map editor, hover over the element you want to set the conditional processing attributes for and click the wrench icon.
  2. Enter the values for each conditional processing attribute that defines the condition in which the element will be displayed.
    If the topic is only intended for administrators, in the audience field enter Administrator
    Tip: To add multiple values for conditional processing attributes, insert a space between each value.

Preview Profiled Content

While editing a topic in the topic editor, you can view the topic with conditional content as it would display in the final output.

  1. In the content library, open a topic and navigate to an element with a conditional processing attribute value set.
    Any document with defined values for conditional processing attributes will display in a label in the margin of the topic editor. The label shows the value or values that have been defined for that element.

  2. Click on a label.

  3. For each conditional processing attribute value, do any of the following:
    • To show the conditionalized output, check Show.
    • To gray the conditionalized output, check grayed.
    • To hide the conditionalized output, check hidden.
  4. Click Apply.

    If Shows was selected, conditionalized output shows alongside non-conditionalized content:

    If grayed was selected, conditionalized output is grayed:

    If Hidden was selected, conditionalized output is hidden: