72. putAttribute

Parameter syntax:

[ '[implicitElement]' ]? [ '[empty]'|'[dummy]'|'[default]'|'[id]' ]? [ '[simplePrompt]'|'[normalDialog]' ]?
attribute_name [ attribute_value ]?

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

Examples:

putAttribute cols
putAttribute alt "XMLmind logo"
putAttribute [implicitElement] cols
putAttribute [dummy] cols
putAttribute [implicitElement] [id] xml:id
putAttribute [simplePrompt] href
putAttribute [implicitElement] [simplePrompt] href

See also editAttribute and addAttribute.