3. addAttribute
Prev | Chapter 6. Commands written in the Java™ programming language | Next

## 3. addAttribute

Parameter syntax:

    [ '[implicitElement]' ]? [ '[empty]'|'[none]'|'[id]' ]? attribute_name [ attribute_value ]?

This command is only useful to write macro commands.

Adds attribute `attribute_name` in explicitly or implicitly selected element if grammar constraining the document allows to do so.

This command is similar to putAttribute except that it will not replace the attribute if it already exists.

Examples:

    addAttribute [implicitElement] cols
    addAttribute linkend "chapter 1"
    addAttribute [dummy] cols
    addAttribute [implicitElement] [dummy] cols

Prev | Up | Next
2. add | Home | 4. addBlockInFlow