DITA Profiling / Conditional Text
DITA offers support for conditionally profiling content by using profiling attributes. With Oxygen XML Editor plugin, you can define values for the DITA profiling attributes and they can be easily managed to filter content in the published output. You can switch between profile sets to see how the edited content looks like before publishing.
Profiling Attributes
You can profile content elements or map elements by adding one or more of the default
DITA
profiling attributes (product
, platform
,
audience
, rev
, props
, and
otherprops
). You can also create your own custom profiling attributes and custom profiling
condition sets. The profiling attributes may contain one or more tokens that
represent conditions to be applied to the content when a publication is built.
For example, you could define a section of a topic that would only be included for
a
publication related to the Windows platform by adding the platform
profiling attribute:
<section platform="windows">
Profiling Conditions
DITA allows you to conditionally profile parts of a topic so that certain parts of the topic are displayed when certain profiling conditions are set. Profiling conditions can be set both within topics and in maps. When set in a topic, they allow you to suppress an element (such as paragraph), step in a procedure, item in a list, or even a phrase within a sentence. When set in a map, they allow you to suppress an entire topic or group of topics. You can then create a variety of publications from a single map by applying profiling conditions to the build.
Apply Profiling to DITA Content
To apply a profiling attribute to DITA content, highlight the content and select Edit Profiling Attributes from the contextual menu. To profile specific elements in a topic or map, right-click inside the element and select Edit Profiling Attributes. The Edit Profiling Attributes dialog box is displayed, allowing you to check each of the profiling tokens that apply for each attribute.
The profiling attributes, and their potential values, that appear in this dialog box
depend
on what has been configured in Oxygen XML Editor plugin. If you have a large list of profiling
attributes, you can use the text filter field to search for attributes or values,
and you
can expand or collapse attributes by using the Expand All/
Collapse All buttons to the right of the text filter or the arrow button to
the left of the profiling attribute name.
The attributes and values that appear in the dialog box are determined as follows:
- If your root DITA map references a DITA subject scheme map that defines values for the profiling attributes, those values are used. Oxygen XML Editor plugin collects all the profiling values from the subject scheme map that is referenced in the map that is currently opened in the DITA Maps Manager (or set as the root map). In the image above (taken from the Oxygen XML Editor plugin documentation project), you see values for eight products. They are the only values that are defined in the subject scheme map and thus, are the only ones that appear in the dialog box.
- If you have defined profiling attribute values for the DITA document type in the Profiling/Conditional Text preferences page, those values are displayed in the dialog box.
- Otherwise, a generic default set of profiling attributes and values are available.
Visualizing Profiled Content
You can visualize the effect of profiling content by using the profiling tools in
the
Profiling/Conditional Text drop-down menu that is located on the
DITA Maps Manager toolbar. You can select which profiles to show,
or apply colors to text that is profiled in various ways, as shown in the following
image:
If the Show Profiling Attributes option (available in the
Profiling / Conditional
Text drop-down menu) is enabled, a green border is painted around profiled
text in the Author mode. Also, all profiling attributes set on the
current element are listed at the end of the highlighted block and in its tooltip
message.
To edit the attributes of a profiled fragment, click one of the listed attribute values.
A
form control pops up and allows you to add or remove attribute values.
Profiling Attribute Value Form Control Pop Up

To watch our video demonstration about DITA profiling, go to https://www.oxygenxml.com/demo/DITA_Profiling.html.