An attribute PI marker includes the name of the attribute as a suffix to the predefined PI marker type name. The content of the marker becomes the value of the attribute for the applicable element tag:
<elementname attributetype="content">
For example, for HTML output, a Rowbgcolor PI marker with content yellow, placed just before a DITA <entry> tag, would add the attribute bgcolor with value yellow to the HTML <tr> tag for the current table row:
<?dthtm Rowbgcolor="yellow" ?>
Nonconforming attribute markers
A few attribute PI markers do not conform exactly to this naming and usage convention; for example, WAI support PI markers CellGroup and CellSpan. See §35.2.4 Assigning table-cell attribute values with PI markers. Another nonconforming attribute marker is MetaType. For HTML output, this marker causes a <meta> tag to be added to the <head> element; Type becomes the value of the name attribute, and the content of the marker becomes the value of the content attribute.
Concatenated attribute markers
Although the text of a DITA PI marker is not limited in length, you can concatenate all PI markers for the same attribute that are inserted before the next item to which they apply. You can just add more PI markers of the same type, and continue the content. For example:
<?dthtm tablesummary="This table
shows the properties" ?>
<?dthtm tablesummary=" you can use for thingamabobs." ?>
Using PI markers to add attributes can result in extra attributes for a given tag. Browsers ignore extra attributes, but validators would not be pleased; see §22.14 Passing W3C validation tests. (Of course validators would not be pleased with most of what is on the Web, so that might be of little consequence.)
If multiple attribute PI markers with identical names but different content apply to the same element, DITA2Go uses the content of the last PI marker encountered as the value of the attribute.
For HTML or XML output, DITA2Go treats any PI marker that has a name that begins with Cell, Char, Graph, Link, Meta, Para, Row, or Table as an attribute PI marker. For HTML (for example), DITA2Go inserts the attribute="value" pair specified by each of the attribute marker types as follows:
Table 38-2 lists the elements to which each attribute PI marker can apply for each output type.