Returns elements linked from the specified IDREF-attribute contained in the specified element.

More exactly, the function returns an enumeration of elements found by the unique identifiers (see GOMElement.id) provided in the value of the specified element attribute.

The same result can be also obtained with the following expression:


findElementsByIds(
  element.getAttrValues(linkAttrName)
)
However, since this operation is often needed in certain applications, a special function was introduced.

In addition, the GOMElement objects produced by this function will have their element types automatically resolved according to the referenced type information (i.e. the elements of which type are linked from this attribute) provided for this attribute by the DSM Type driver.

Parameters:

element

The element whose attribute is requested. If not specified, the generator context element is assumed, i.e. the same as the call: getElementsByLinkAttr(contextElement, linkAttrName)
linkAttrName
The name of the IDREF-attribute.

Normally, this is supposed to be a multi-valued attribute. However, a single-value attribute is also allowed. In that case, the function will simply return a single-element enumeration.

filterQuery
This parameter allows you to specify an additional condition on the initially found elements to be included in the result enumeration.

When specified, this should be a boolean subquery created with BooleanQuery() function. The subquery will be processed against each initially selected element and should return true if the element must be included in the result enumeration and false otherwise. The tested element is passed into the subquery as the generator context element.

Returns:

The enumeration of GOMElement objects representing the found elements or an empty enumeration otherwise (e.g. when the attribute has an empty value list; neither of the identifiers points to an existing element; wrong attribute name)

See Also:

getAttrValues(), findElementsByIds()

${include ../../../refs/element_id.htm}

${include ../../../refs/element_types.htm}