Edit online

Overview

Conditional processing attributes can be specified using grouped values. Groups organize the attributes into subcategories. This is intended to support situations where an attribute applies to multiple specialized subcategories. For example, suppose a company needs to filter content for several internal teams (operations and support) and they use the @audience attribute with the values ops and support, but the Support team has several levels of personnel (L1, L2, and L3). They could use a group to define the levels (L1, L2, and L3) as subcategories for the support value. Using groups for these subcategories allows each category to be processed independently.

A major advantage is that you do not need to add new profiling attributes using a DTD specialization. You can re-use existing DITA profiling attributes (such as @product, @audience, @otherprops) and specify multiple attribute subcategories.

Creating a Conditional Profiling Attribute Group

To create a group in Oxygen XML Editor:
  1. Open the Preferences dialog box (Options > Preferences) and go to Editor > Edit modes > Author > Profiling / Conditional Text.
  2. To add new attributes and values, click the New button at the bottom of the Profiling Attributes table. To customize existing attributes and their values, select an attribute and click the Edit button.

    Step Result: In either case, this opens a Profiling Attribute configuration dialog box where you can define attributes that exist in your schema.

  3. Specify the appropriate values for the Document type, Attribute name, and Display name.

    For information about the Profiling Attribute configuration dialog box, see Defining Profiling Attributes for DITA Content.

  4. Click the New button at the bottom of the attribute values table.
  5. In the Value field of the resulting dialog box, define groups using the following format: ParentAttrValue(SubAttrValue1 SubAttrValue2). For example:
    support(L1 L2 L3)
  6. Click OK and Apply to save and apply the changes.

Using Conditional Groups in Conjunction with a DITAVAL File

You can use groups to customize a hierarchy of profiling attribute values and then use it in conjunction with a DITAVAL file to filter or flag the values. For example, suppose the company described in the example in the Overview section needed to generate content for the Support team, but only for L1 and L2 support personnel. The DITAVAL file could look like this:
<val>
     <prop action="include" att="support" val="L1"/>
     <prop action="include" att="support" val="L2"/>
     <prop action="exclude" att="support" val="L3"/>
</val>

That DITAVAL file could then be used for a condition set to filter content in Author mode or during the transformation stage to filter content in the output and content profiled with the L1 and L2 values would be included while content with the L3 value would be excluded.

This example company could also have another DITAVAL file for filtering out all content profiled for any of the three subcategories (L1, L2, L3) by simply excluding the support value (since L1, L2, and L3 are subcategories of it).
<val>
     <prop action="exclude" att="support"/>
</val>

For more information about creating conditional profiling attribute groups, watch our video demonstration: