Condition to Attribute

Applies filtering attribute values based on conditional tagging in the current file or book.

This command requires initial setup in the DefaultCondToAttr parameter and the CondToAttrMap section of the fm2dita.ini file. The CondToAttrMap INI section allows you to define a mapping of condition name and attribute name. The DefaultCondToAttr parameter specifies the default attribute name to use for conditions where no mapping is expressly defined in the CondToAttrMap section.

Important: Only block-level conditional tagging is mapped to attributes, and only the tagging that “touches” the start of the block-level element is used. Also, the results from this command should be carefully reviewed for usefulness. There are situations where multiple elements will be tagged with the same attribute value because they all “touched” the same condition, but this may not be as desired. For example, if the first list item is conditionalized, the <p> tag, the <li> tag, and the <ul> tag may all receive the conditional attribute.

For “container” elements, the conditional tagging is checked just inside the open tag. For tables (i.e., tgroup element), the conditional tagging is checked just before the table anchor.

This command must be run after the EDD has been applied and it may be useful to run this command before commands that may rearrange elements (like Fix Images or Fix Tables).