Finds elements by the specified Location Rules interpreted against
the specified context element and returns the first of the found elements.
If no elements found, the function returns null
.
This function does the same as the following calls:
findElementsByLRules (
... // the same parameters
).next().toElement()
Parameters:
element
If this parameter is not specified, the generator context element
is used by default,
which is the same as the call: contextElement.findElementByLRules(...)
See Also: GOMContext.contextElement
locationRules
Each Location Rule is represented by an object created
using LocationRule()
function.
See the description of that function for more detail.
The passed array should be created with a function-call-like construct looking as
LocationRule[] (
...
)
Note: You can use the Location Rule Builder (found at the left panel's tree) to quickly construct Location Rules needed for this parameter.
elementTypeSpec
The returned element will comply with at least one of the specified target Element Types.
filterQuery
This should be a boolean subquery created with BooleanQuery()
function.
The subquery will be processed against each initially selected element.
It must return true
if the element may be returned
as the function result and false
otherwise.
The tested element is passed as the generator context element.
LocationRule(), BooleanQuery(), findElementsByLRules(), findElementByLPath()