DITAVALs
DITAVALs are files that filter content based on the rules defined within them. Use DITAVALs to filter content so that it changes when you deliver it according to the rules in your DITAVAL. A DITAVAL can hold multiple rules that utilize conditional processing attributes.
For more information about conditional processing, see Conditional processing (profiling) and for examples of DITAVAL files, see <val> in the DITA 1.3 Specification.
Conditional processing is also referred to as profiling.
DITAVAL Action Attribute
The action attribute enables you to process profiled content in the following ways:
- include
Includes content in the output.
- exclude
Excludes content from the output.
- passthrough
Includes content in the output and preserves the attribute value for further processing. This may be useful for some outputs that include a filtering functionality. This attribute value is supported only by the DITA Open Toolkit (DITA-OT) publishing engine.
- flag
Includes and flags content in the output. Flagging content is supported only by the DITA Open Toolkit (DITA-OT) publishing engine. This means that the color (
color
), background color (backcolor
), and style (style
) attributes, as well as the start flag (startflag
) and end flag (endflag
) elements are only supported in DITA-OT.
Operation
By default, conditional content is processed this way:
Content with no conditional processing attributes applied is included in the deliverable.
The default behavior of conditional processing is to include content, so if you have only one condition, use only the exclude rule.
You cannot nest conditions. Parent conditional elements take precedence over children conditional elements.
Flagging only works in OT
Guidelines
Keep the following guidelines in mind when working with DITAVALs:
- You can create generic DITAVAL files that apply to any map. We
recommend using generic DITAVALs if there is not much
conditional content in your documentation.
Examples: customer_facing_online or internal_print.
- You can create DITAVAL files that apply only to specific maps. We
recommend using map-specific DITAVALs if there is a lot of
conditional content in your documentation.
Examples: map_title_customer_facing or map_title_internal_print.
Establish a naming convention to ensure that everyone in your organization can easily find and identify DITAVALs.
Create DITAVALs for all conditional profiles to ensure that you do not accidentally publish content that you want to filter out.
Apply conditions in the context of the deliverable or target map, rather than on content in a library or warehouse file.
Keep the maintenance of conditional processing in mind as you apply conditions. For example, apply conditions to entire steps or paragraphs instead of words. If you need different terms in different contexts, consider using keys instead of conditional processing.