Apply attribute filters

Learn to apply filter attributes in a DITA topic in Adobe FrameMaker.

In this topic

Introduction

You can make elements in a DITA topic conditional by applying values to the attribute of the elements. You then create a filter in which you define the rules to include and exclude content based on the element attribute values.

Before you create topics with conditional content, you need to first plan the criteria for the output. For example, say that a topic has content that is conditionally targeted at administrators and end users. In the topic, you apply attribute values based on the target audience of the content (see Create attribute filters). You then create a filter in FrameMaker in which you specify the elements to include and exclude based on the attribute value defined in the topic (see Create attribute filters).

Apply attributes to an element

To apply attributes to an element, do the following:

  1. Select the element in the topic.

    You can select the element in the Structure View or in the Document view.

  2. Chooe Element > Edit Attributes to open the Attributes panel and enter the value for the specific element attribute.

You do not need to apply attributes to every element in your topic. You only need to apply attributes to elements that need to be conditionally filtered.

Tip: In the Attributes panel, choose the Required and Specified option to filter the attribute list to display the attributes that you have defined.

Set attribute values for elements

To allow FrameMaker to conditionally process elements in a DITA topic, you need to specify the elements to include or exclude from the output based on the attribute values.

For example, you can set the @audience attribute values for the an element to admin, enduser, and author depending on the target audience.

You can set a value to any attribute in the elements in a DITA topic. You can then filter the content based on the specified attribute values.

Important: You can apply a filter to any element in a DITA topic. This implies that if you apply a filter that hides a mandatory element (such as Title), the structure of the topic will be broken.

Keyboard shortcut to apply an attribute

You can use the Smart Catalog shortcut to apply attribute values to an element:

  1. Press ctrl+7 to display the Smart Catalog to set one or more attribute values for the current element.

  2. From the Smart Catalog select the required attribute.

    The Attributes panel displays with the attribute selected.

  3. Enter the attribute value.

    Note: With the attribute selected in the Attributes panel, you do not need to select the attribute. You can simply type to enter the attribute value.