first argument– a list value to search
second argument– value for which to search
third argument– (optional) starting index
This function returns either the ordinal position of a list element that matches a given value or -1 (the given value is not in the list).
The following expression returns 1.
<indexOf>
<list>
<s>apples</s>
<s>oranges</s>
</list>
<s>oranges</s>
</indexOf>
The following expression returns 3.
<indexOf>
<list
<s>apples</s>
<s>oranges</s>
</list>
<s>oranges</s>
<i>2</i>
</indexOf>