This function iterates by all elements from the specified enumeration and for each of them executes the specified subquery. All values returned by the subquery are collected together and returned in a single array.

Parameters:

elements

The enumeration of elements to be iterated.

When some elements in the enumeration are repeating (which is determined by the element's unique identifiers), they will be skipped over. Only unique elements are processed.

When this parameter is null, an empty array is returned.

valueQuery
The subquery that will be executed against each iterated element to produce one or several values to be collected.

The element is passed to the subquery as the generator context element (see GOMContext.contextElement).

When the subquery returns an array, all non-null items contained in that array are collected. Any other non-null value returned by the subquery will be collected as a whole.

When this parameter is null or omitted, the element's values (one or multiple, when it has a list value; see GOMElement.values) will be collected.

See Also:
collectAttrValues(), collectValuesByLPath(), GOMElement.values
${include ../../../refs/element_id.htm}