#### 34.1.2 Using paragraph formats for WAI attributes

To use a paragraph-format method, you must dedicate a different paragraph format to each WAI attribute or combination of attributes that you need in your document. You can use a paragraph format for either of the following:

- a single attribute, and use multiple paragraphs (each with a different format) to apply more than one attribute to the same item in your document;
- a combination of attributes, and use a single paragraph to apply the combination.

To hide WAI markup, use conditions

Using a different paragraph format for material that does not actually call for a different format in printed versions can unduly complicate document maintenance. To get around this drawback, you can use the following variation:

1. Apply the WAI paragraph format to an extra paragraph you insert just before the item that requires the markup (or in the same cell, if in a table).
2. Apply a condition, so you can hide the content of that extra paragraph in printed versions of the document.
3. In the configuration file specify the Delete property for the paragraph format, to exclude the extra paragraph from HTML output.

Assign WAI attributes with properties

You assign DITA2Go properties to paragraph formats in the [HtmlStyles] section, and you assign values to the attributes represented by those properties in [StyleCell*] sections. WAI table-cell attributes can be assigned this way; see §35.2.2 Using paragraph formats for table-cell attributes.

Use special paragraphs for WAI attribute values

In the [HtmlStyles] section you assign properties that represent WAI attributes (and usually also the Delete property) to a paragraph format; DITA2Go uses the content of the paragraph as the value of the attribute.

You can use an existing paragraph format for this purpose, and omit the Delete property, if the format conforms to all of the following:

- The paragraph format is not used for unrelated purposes elsewhere in the document.
- Each paragraph with that format already contains text suitable for the attribute value.
- Each paragraph with that format appears just before an item that needs the attribute (with no intervening items of the same type), or in a table cell that needs the attribute.

Previous Topic: 34.1.1 Choosing a markup method for WAI attributes

Next Topic: 34.1.3 Inserting PI markers for WAI attributes

Parent Topic: 34.1 Comparing DITA2Go markup methods for WAI

Sibling Topics:

34.1.1 Choosing a markup method for WAI attributes

34.1.3 Inserting PI markers for WAI attributes