Returns a vector containing the predecessor of the specified element
starting from the immediate one (which is provided by
element.predecessor
property) until the nearest predecessor
which complies with at least one of the specified Element Types
(if parameter included
is true
, that predecessor
will also be included in result vector).
The element predecessors are other elements by which the given element has been reached as it was retrieved from the data source (DSM). See also "What are element predecessors?" below.
Note: This is a convenience function whose result may be achieved
using GOMElement.predecessors
property and the functions:
iterate(), instanceOf(), Vector()
.
Parameters:
element
The element whose predecessors are requested.If not specified, the generator context element is assumed, which is the same as the call:
See Also:getPredecessorsUntilType ( contextElement, elementTypeSpec )
GOMContext.contextElement
Note: When this parameter is
null
, the function returns an empty vector.
elementTypeSpec
Specifies the list of target Element Types (see "Specifying Matching Element Types" below).When neither of the predecessors complies with the specified Element Types, the result vector will include all predecessors (the same as it would be returned by:
element.predecessors.toVector()
).Note: When the list contains names of non-existent Element Types, the generator will raise an error.
included
When this parameter is true
, the predecessor on whom
the search was terminated will also be included in the result
vector (as its last element).
${include ../../../refs/element_predecessors.htm}
${include ../../../refs/matching_ets_spec.htm}