Returns all values of the specified attribute contained in the specified element.

For a single-component (simple) value, the function returns a single-element array containing that value.

For a multi-component (list) value (see GOMAttribute.multiValued), the property returns an array containing all value components (list items).

Parameters:

element

The element whose attribute is requested. If not specified, the generator context element is assumed, i.e. the same as the call: getAttrValues(contextElement, attrName)
attrName
The attribute name.

Note: Some DSM Types may support pseudo- (or formula-) attributes. Such attributes are specified with the FlexQuery expressions which calculate the attributes' values from another (real) attributes, possible with the use of some functions.

Pseudo-attributes are treated the same way as the normal ones. (That's actually why the pseudo-attributes were introduced in the first place). Obtaining the value of a pseudo-attribute will just evoke the internal processing of its formula (therefore, if an error occurred during this, it will be reported accordingly). Externally, accessing pseudo-attributes looks the same as the accessing the normal ones. So does this function.

Returns:

The array of all values associated with the found attribute.

If the element contains no attribute with the specified name (or in the case element == null), an empty array is returned.

See Also:

getAttrValue(), getAttrFullValue(), hasAttrValue(), GOMAttribute.values, getValuesByLPath()
Tips:

(1) You may call this function in a more method-like style:

element.getAttrValues(attrName)
(2) Using Location Path, the result returned by this function can also be obtained by the following call:
element.getValuesByLPath("@attrName")
(however, it will work more slowly).