This function receives the specified enumeration of the source elements
(i.e. GOMElement
objects) and returns another enumeration
containing only those elements that comply with the target Element Type(s)
and/or satisfy the filtering conditions specified in the form of
a boolean subexpression evaluated against every element.
The initial element ordering is preserved.
Parameters:
elementEnum
The enumeration of the source elements
elementTypeSpec
The list of target Element Types (see "Specifying Matching Element Types" below).When this parameter is specified, every element to be included in the result enumeration should comply with at least one of the target Element Types.
filterQuery
The filtering conditions for the result elements.When specified, this should be a boolean subquery created with
BooleanQuery()
function. The subquery will be processed against each initially selected element and should returntrue
if the element must be included in the result enumeration andfalse
otherwise. The tested element is passed as the generator context element.
Example:
This expression returns an enumeration of those elements contained in the source enumerationclassName = getAttrStringValue("name"); e.filterElements ("Method", BooleanQuery ( getAttrStringValue("class") == className ) );
'e'
, which are
'Method'
Element Type;'class'
attribute has a value equal to the value
of the 'name'
attribute of the generator's current
context element.See Also:
BooleanQuery(), filterElementsByKey()
${include ../../../refs/matching_ets_spec.htm}
${include ../../../refs/element_types.htm}