Omni Systems, Inc.   Mif2Go User's Guide, Version 55


15 Converting to DITA XML > 15.4 Configuring DITA elements > 15.4.6 Assigning attributes to DITA elements > 15.4.6.4 Specifying attribute values for a block element or parent

15.4.6.4 Specifying attribute values for a block element or parent

For attributes of block elements, you can do the following:

Assign block element attributes

Override block element attributes

Assign interpolated parent attributes

Override interpolated parent attributes

When you want to override default or assigned attributes, keep in mind:

Where to use DITAAttribute markers

Assign block element attributes

To apply attributes (other than id) to a block element (other than <xref>), assign attribute="value" pairs, separated by spaces, to the paragraph format(s) mapped to the element:

[DITAParaAttributes]

; Frame para format (wildcards OK) = attributes

ParaFmt = attribute1="value1" attribute2="value2" ...

You can use Mif2Go macros for any part of the assignment, or even for the entire assignment. For example:

[DITAParaAttributes]

ParaFmt = <$MacroToWriteAttrs>

Override block element attributes

To override a setting in [DITAParaAttributes] or to override default attributes for a particular instance of a block element, place a DITAAttribute marker in a paragraph mapped to the element, with content as follows:

elementname: attribute1="value1" attribute2="value2" ...

For example:

linklist: role="friend" type="reference"

The name of the element must be followed by a colon. Separate attribute="value" pairs with a space. Each value must be enclosed in double quotes. You can use Mif2Go macros for everything after the colon.

Assign interpolated parent attributes

To assign attributes to an interpolated parent of a block element:

[DITAParentAttributes]

; Frame para format (wildcards OK) = parentname: attributes

ParaFmt = parentname: attribute1="value1" attribute2="value2" ...

You can use Mif2Go macros for the assignment.

Override interpolated parent attributes

To override a setting in [DITAParentAttributes] or to override default attributes for an interpolated parent of a block element, place a DITAAttribute marker in a paragraph mapped to the element, with content as follows:

parentname: attribute1="value1" attribute2="value2" ...

To apply attributes to more than one interpolated parent, use a separate marker for each parent.

Where to use DITAAttribute markers

Use DITAAttribute markers only to supply attribute values other than the DTD default values for an element, or to override attribute values specified in a configuration file. Do not use DITAAttribute markers for any of the following:

A DITAAttribute marker overrides settings in [DITAParaAttributes] and [DITAParentAttributes], but does not override settings in [DITACharAttributes] (see §15.4.6.5 Specifying attribute values for an inline element) or [DITATableAttributes] (see §15.6 Converting tables to DITA XML).